Skip to content

Commit 65b4f61

Browse files
committed
Polish
1 parent 951f051 commit 65b4f61

File tree

1 file changed

+2
-6
lines changed
  • spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven

1 file changed

+2
-6
lines changed

spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RunMojo.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,12 @@ private boolean hasDevtools() {
120120
return this.hasDevtools;
121121
}
122122

123+
@SuppressWarnings("resource")
123124
private boolean checkForDevtools() {
124125
try {
125126
URL[] urls = getClassPathUrls();
126127
URLClassLoader classLoader = new URLClassLoader(urls);
127-
try {
128-
return (classLoader.findResource(RESTARTER_CLASS_LOCATION) != null);
129-
}
130-
finally {
131-
classLoader.close();
132-
}
128+
return (classLoader.findResource(RESTARTER_CLASS_LOCATION) != null);
133129
}
134130
catch (Exception ex) {
135131
return false;

0 commit comments

Comments
 (0)