Use parseInt without substring method

This commit is contained in:
김보배(Bobae Kim)/Platform Engineering팀/11ST
2021-11-12 14:53:27 +09:00
committed by Arjen Poutsma
parent 79d3f5c64c
commit 804b343cab
13 changed files with 24 additions and 24 deletions

View File

@@ -457,11 +457,11 @@ public class PropertiesBeanDefinitionReader extends AbstractBeanDefinitionReader
}
else if (property.startsWith(CONSTRUCTOR_ARG_PREFIX)) {
if (property.endsWith(REF_SUFFIX)) {
int index = Integer.parseInt(property.substring(1, property.length() - REF_SUFFIX.length()));
int index = Integer.parseInt(property, 1, property.length() - REF_SUFFIX.length(), 10);
cas.addIndexedArgumentValue(index, new RuntimeBeanReference(entry.getValue().toString()));
}
else {
int index = Integer.parseInt(property.substring(1));
int index = Integer.parseInt(property, 1, property.length(), 10);
cas.addIndexedArgumentValue(index, readValue(entry));
}
}