HHH-6772 org.hibernate.ejb.test.BaseEntityManagerFunctionalTestCase overrides system properties

This commit is contained in:
Strong Liu 2011-10-26 14:21:18 +08:00
parent 2bbb3074d4
commit a9064790e3
1 changed files with 1 additions and 22 deletions

View File

@ -139,7 +139,7 @@ public abstract class BaseEntityManagerFunctionalTestCase extends BaseUnitTestCa
}
protected Map getConfig() {
Map<Object, Object> config = loadProperties();
Map<Object, Object> config = new HashMap<Object, Object>( );
ArrayList<Class> classes = new ArrayList<Class>();
classes.addAll( Arrays.asList( getAnnotatedClasses() ) );
@ -163,27 +163,6 @@ public abstract class BaseEntityManagerFunctionalTestCase extends BaseUnitTestCa
protected void addConfigOptions(Map options) {
}
private Properties loadProperties() {
Properties props = new Properties();
InputStream stream = Persistence.class.getResourceAsStream( "/hibernate.properties" );
if ( stream != null ) {
try {
props.load( stream );
}
catch ( Exception e ) {
throw new RuntimeException( "could not load hibernate.properties" );
}
finally {
try {
stream.close();
}
catch ( IOException ignored ) {
}
}
}
return props;
}
protected static final Class<?>[] NO_CLASSES = new Class[0];
protected Class<?>[] getAnnotatedClasses() {