Polish
This commit is contained in:
parent
08fbe87290
commit
951f051df9
@ -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() {
|
||||
|
@ -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;
|
||||
|
@ -25,9 +25,6 @@ import java.util.Set;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.orm.jpa.JpaVendorAdapter;
|
||||
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
|
||||
import org.springframework.orm.jpa.persistenceunit.PersistenceUnitManager;
|
||||
@ -48,9 +45,6 @@ import org.springframework.util.ClassUtils;
|
||||
*/
|
||||
public class EntityManagerFactoryBuilder {
|
||||
|
||||
private static final Log logger = LogFactory
|
||||
.getLog(EntityManagerFactoryBuilder.class);
|
||||
|
||||
private final JpaVendorAdapter jpaVendorAdapter;
|
||||
|
||||
private final PersistenceUnitManager persistenceUnitManager;
|
||||
@ -211,7 +205,8 @@ public class EntityManagerFactoryBuilder {
|
||||
entityManagerFactoryBean.getJpaPropertyMap().putAll(this.properties);
|
||||
URL rootLocation = EntityManagerFactoryBuilder.this.persistenceUnitRootLocation;
|
||||
if (rootLocation != null) {
|
||||
entityManagerFactoryBean.setPersistenceUnitRootLocation(rootLocation.toString());
|
||||
entityManagerFactoryBean
|
||||
.setPersistenceUnitRootLocation(rootLocation.toString());
|
||||
}
|
||||
if (EntityManagerFactoryBuilder.this.callback != null) {
|
||||
EntityManagerFactoryBuilder.this.callback
|
||||
|
Loading…
x
Reference in New Issue
Block a user