Polish
See gh-12236
This commit is contained in:
committed by
Stephane Nicoll
parent
a93052f380
commit
56cbc65e7b
@@ -147,11 +147,9 @@ class Installer {
|
||||
String home = SystemPropertyUtils
|
||||
.resolvePlaceholders("${spring.home:${SPRING_HOME:.}}");
|
||||
File extDirectory = new File(new File(home, "lib"), "ext");
|
||||
if (!extDirectory.isDirectory()) {
|
||||
if (!extDirectory.mkdirs()) {
|
||||
throw new IllegalStateException(
|
||||
"Failed to create ext directory " + extDirectory);
|
||||
}
|
||||
if (!extDirectory.isDirectory() && !extDirectory.mkdirs()) {
|
||||
throw new IllegalStateException(
|
||||
"Failed to create ext directory " + extDirectory);
|
||||
}
|
||||
return extDirectory;
|
||||
}
|
||||
|
||||
@@ -179,11 +179,10 @@ public abstract class AstUtils {
|
||||
private static ClosureExpression getClosure(String name,
|
||||
MethodCallExpression expression) {
|
||||
Expression method = expression.getMethod();
|
||||
if (method instanceof ConstantExpression) {
|
||||
if (name.equals(((ConstantExpression) method).getValue())) {
|
||||
return (ClosureExpression) ((ArgumentListExpression) expression
|
||||
.getArguments()).getExpression(0);
|
||||
}
|
||||
if (method instanceof ConstantExpression
|
||||
&& name.equals(((ConstantExpression) method).getValue())) {
|
||||
return (ClosureExpression) ((ArgumentListExpression) expression
|
||||
.getArguments()).getExpression(0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -103,11 +103,10 @@ public abstract class ResourceUtils {
|
||||
List<String> result = new ArrayList<>();
|
||||
for (Resource resource : resources) {
|
||||
if (resource.exists()) {
|
||||
if (resource.getURI().getScheme().equals("file")) {
|
||||
if (resource.getFile().isDirectory()) {
|
||||
result.addAll(getChildFiles(resource));
|
||||
continue;
|
||||
}
|
||||
if (resource.getURI().getScheme().equals("file")
|
||||
&& resource.getFile().isDirectory()) {
|
||||
result.addAll(getChildFiles(resource));
|
||||
continue;
|
||||
}
|
||||
result.add(absolutePath(resource));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user