Polish: String function use should be optimized for single characters

This commit is contained in:
igor-suhorukov
2018-02-25 22:34:35 +03:00
committed by Juergen Hoeller
parent 9c55dd5961
commit 49fd724d8f
31 changed files with 42 additions and 42 deletions

View File

@@ -346,7 +346,7 @@ public class GenericCallMetaDataProvider implements CallMetaDataProvider {
else if (found.isEmpty()) {
if (metaDataProcedureName != null && 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

@@ -210,7 +210,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;