Polish: String function use should be optimized for single characters

(cherry picked from commit 49fd724)
This commit is contained in:
igor-suhorukov
2018-02-25 20:34:35 +01:00
committed by Juergen Hoeller
parent 073e78b68d
commit 39ddd0f349
23 changed files with 32 additions and 32 deletions

View File

@@ -338,7 +338,7 @@ public class GenericCallMetaDataProvider implements CallMetaDataProvider {
}
else if (found.isEmpty()) {
if (metaDataProcedureName.contains(".") && !StringUtils.hasText(metaDataCatalogName)) {
String packageName = metaDataProcedureName.substring(0, metaDataProcedureName.indexOf("."));
String packageName = metaDataProcedureName.substring(0, metaDataProcedureName.indexOf('.'));
throw new InvalidDataAccessApiUsageException(
"Unable to determine the correct call signature for '" + metaDataProcedureName +
"' - package name should be specified separately using '.withCatalogName(\"" +

View File

@@ -209,7 +209,7 @@ public abstract class ScriptUtils {
}
else if (script.startsWith(commentPrefix, i)) {
// Skip over any content from the start of the comment to the EOL
int indexOfNextNewline = script.indexOf("\n", i);
int indexOfNextNewline = script.indexOf('\n', i);
if (indexOfNextNewline > i) {
i = indexOfNextNewline;
continue;