Upgrade to spring-javaformat 0.0.11

This commit is contained in:
Andy Wilkinson
2019-06-07 09:44:58 +01:00
parent d548c5ed31
commit 8f1be4cded
1940 changed files with 16814 additions and 28498 deletions

View File

@@ -53,9 +53,7 @@ public class FindMainClass extends Task {
if (!StringUtils.hasText(mainClass)) {
mainClass = findMainClass();
if (!StringUtils.hasText(mainClass)) {
throw new BuildException(
"Could not determine main class given @classesRoot "
+ this.classesRoot);
throw new BuildException("Could not determine main class given @classesRoot " + this.classesRoot);
}
}
handle(mainClass);
@@ -63,17 +61,14 @@ public class FindMainClass extends Task {
private String findMainClass() {
if (this.classesRoot == null) {
throw new BuildException(
"one of @mainClass or @classesRoot must be specified");
throw new BuildException("one of @mainClass or @classesRoot must be specified");
}
if (!this.classesRoot.exists()) {
throw new BuildException(
"@classesRoot " + this.classesRoot + " does not exist");
throw new BuildException("@classesRoot " + this.classesRoot + " does not exist");
}
try {
if (this.classesRoot.isDirectory()) {
return MainClassFinder.findSingleMainClass(this.classesRoot,
SPRING_BOOT_APPLICATION_CLASS_NAME);
return MainClassFinder.findSingleMainClass(this.classesRoot, SPRING_BOOT_APPLICATION_CLASS_NAME);
}
return MainClassFinder.findSingleMainClass(new JarFile(this.classesRoot), "/",
SPRING_BOOT_APPLICATION_CLASS_NAME);