Polishing
This commit is contained in:
parent
914b2470dc
commit
4fef1fe820
|
@ -285,7 +285,7 @@ public class ConfigurationClassPostProcessor implements BeanDefinitionRegistryPo
|
|||
configCandidates.sort((bd1, bd2) -> {
|
||||
int i1 = ConfigurationClassUtils.getOrder(bd1.getBeanDefinition());
|
||||
int i2 = ConfigurationClassUtils.getOrder(bd2.getBeanDefinition());
|
||||
return (i1 < i2) ? -1 : (i1 > i2) ? 1 : 0;
|
||||
return Integer.compare(i1, i2);
|
||||
});
|
||||
|
||||
// Detect any custom bean name generation strategy supplied through the enclosing application context
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -165,9 +165,9 @@ public abstract class ScriptUtils {
|
|||
* @param statements the list that will contain the individual statements
|
||||
* @throws ScriptException if an error occurred while splitting the SQL script
|
||||
*/
|
||||
public static void splitSqlScript(@Nullable EncodedResource resource, String script, String separator, String commentPrefix,
|
||||
String blockCommentStartDelimiter, String blockCommentEndDelimiter, List<String> statements)
|
||||
throws ScriptException {
|
||||
public static void splitSqlScript(@Nullable EncodedResource resource, String script,
|
||||
String separator, String commentPrefix, String blockCommentStartDelimiter,
|
||||
String blockCommentEndDelimiter, List<String> statements) throws ScriptException {
|
||||
|
||||
Assert.hasText(script, "'script' must not be null or empty");
|
||||
Assert.notNull(separator, "'separator' must not be null");
|
||||
|
@ -179,6 +179,7 @@ public abstract class ScriptUtils {
|
|||
boolean inSingleQuote = false;
|
||||
boolean inDoubleQuote = false;
|
||||
boolean inEscape = false;
|
||||
|
||||
for (int i = 0; i < script.length(); i++) {
|
||||
char c = script.charAt(i);
|
||||
if (inEscape) {
|
||||
|
@ -244,6 +245,7 @@ public abstract class ScriptUtils {
|
|||
}
|
||||
sb.append(c);
|
||||
}
|
||||
|
||||
if (StringUtils.hasText(sb)) {
|
||||
statements.add(sb.toString());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue