Commit 65b4f61a authored by Phillip Webb's avatar Phillip Webb

Polish

parent 951f051d
...@@ -120,16 +120,12 @@ public class RunMojo extends AbstractRunMojo { ...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment