This commit is contained in:
Phillip Webb
2016-09-01 14:38:54 +01:00
parent 08fbe87290
commit 951f051df9
3 changed files with 13 additions and 14 deletions

View File

@@ -140,8 +140,8 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
/**
* Flag to indicate if the run processes should be forked. {@code fork } is
* automatically enabled if an agent or jvmArguments are specified, or if
* devtools is present.
* automatically enabled if an agent or jvmArguments are specified, or if devtools is
* present.
* @since 1.2
*/
@Parameter(property = "fork")
@@ -167,8 +167,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
getLog().debug("skipping run as per configuration.");
return;
}
final String startClassName = getStartClass();
run(startClassName);
run(getStartClass());
}
/**
@@ -237,8 +236,8 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
}
/**
* Log a warning indicating that fork mode has been explicitly disabled
* while some conditions are present that require to enable it.
* Log a warning indicating that fork mode has been explicitly disabled while some
* conditions are present that require to enable it.
* @see #enableForkByDefault()
*/
protected void logDisabledFork() {

View File

@@ -124,7 +124,12 @@ public class RunMojo extends AbstractRunMojo {
try {
URL[] urls = getClassPathUrls();
URLClassLoader classLoader = new URLClassLoader(urls);
return (classLoader.findResource(RESTARTER_CLASS_LOCATION) != null);
try {
return (classLoader.findResource(RESTARTER_CLASS_LOCATION) != null);
}
finally {
classLoader.close();
}
}
catch (Exception ex) {
return false;