Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在调用 nextIdSimple 获取id时,batchSize = 0 时会出现越界 #22

Open
iheshichao opened this issue Jun 29, 2020 · 1 comment
Open

Comments

@iheshichao
Copy link

curl http://127.0.0.1:9999/tinyid/id/nextIdSimple -d 'token=0f673adf80504e2eaa552f5d791b644c&bizType=test&batchSize=0'

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.AbstractStringBuilder.deleteCharAt(AbstractStringBuilder.java:824) ~[?:1.8.0_241]
at java.lang.StringBuilder.deleteCharAt(StringBuilder.java:253) ~[?:1.8.0_241]
at com.xiaoju.uemc.tinyid.server.controller.IdContronller.nextIdSimple(IdContronller.java:85) [classes/:?]

@351524388
Copy link

确实有这个问题,可以考虑在checkBatchSize方法中改进一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants