mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-01 06:49:42 +00:00
Merge branch '4.0.x' into 4.1.x
Closes gh-50959
This commit is contained in:
+3
-2
@@ -71,8 +71,9 @@ public class FindMainClass extends Task {
|
||||
if (this.classesRoot.isDirectory()) {
|
||||
return MainClassFinder.findSingleMainClass(this.classesRoot, SPRING_BOOT_APPLICATION_CLASS_NAME);
|
||||
}
|
||||
return MainClassFinder.findSingleMainClass(new JarFile(this.classesRoot), "/",
|
||||
SPRING_BOOT_APPLICATION_CLASS_NAME);
|
||||
try (JarFile jarFile = new JarFile(this.classesRoot)) {
|
||||
return MainClassFinder.findSingleMainClass(jarFile, "/", SPRING_BOOT_APPLICATION_CLASS_NAME);
|
||||
}
|
||||
}
|
||||
catch (IOException ex) {
|
||||
throw new BuildException(ex);
|
||||
|
||||
Reference in New Issue
Block a user