Refine use of substring operations

Closes gh-25445
This commit is contained in:
XenoAmess
2020-07-21 23:09:43 +08:00
committed by Sam Brannen
parent cdc234d7db
commit edfc6c0293
14 changed files with 15 additions and 15 deletions

View File

@@ -107,7 +107,7 @@ public class TaskExecutorFactoryBean implements
int separatorIndex = this.poolSize.indexOf('-');
if (separatorIndex != -1) {
corePoolSize = Integer.parseInt(this.poolSize.substring(0, separatorIndex));
maxPoolSize = Integer.parseInt(this.poolSize.substring(separatorIndex + 1, this.poolSize.length()));
maxPoolSize = Integer.parseInt(this.poolSize.substring(separatorIndex + 1));
if (corePoolSize > maxPoolSize) {
throw new IllegalArgumentException(
"Lower bound of pool-size range must not exceed the upper bound");