This commit is contained in:
Phillip Webb 2016-09-01 18:02:00 +01:00
parent 951f051df9
commit 65b4f61a35
1 changed files with 2 additions and 6 deletions

View File

@ -120,16 +120,12 @@ public class RunMojo extends AbstractRunMojo {
return this.hasDevtools; return this.hasDevtools;
} }
@SuppressWarnings("resource")
private boolean checkForDevtools() { private boolean checkForDevtools() {
try { try {
URL[] urls = getClassPathUrls(); URL[] urls = getClassPathUrls();
URLClassLoader classLoader = new URLClassLoader(urls); URLClassLoader classLoader = new URLClassLoader(urls);
try { return (classLoader.findResource(RESTARTER_CLASS_LOCATION) != null);
return (classLoader.findResource(RESTARTER_CLASS_LOCATION) != null);
}
finally {
classLoader.close();
}
} }
catch (Exception ex) { catch (Exception ex) {
return false; return false;