Polish: String function use should be optimized for single characters
This commit is contained in:
committed by
Juergen Hoeller
parent
9c55dd5961
commit
49fd724d8f
@@ -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(\"" +
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user