ARTEMIS-2320 Synchronization on a non-final field

This commit is contained in:
Jiri Danek 2019-04-26 15:09:50 +02:00 committed by Michael Andre Pearce
parent f508a25566
commit 4abc2e0430
2 changed files with 2 additions and 10 deletions

View File

@ -26,7 +26,7 @@ public class PropertiesLoader {
private static final Logger logger = Logger.getLogger(PropertiesLoader.class); private static final Logger logger = Logger.getLogger(PropertiesLoader.class);
static Map<FileNameKey, ReloadableProperties> staticCache = new HashMap<>(); static final Map<FileNameKey, ReloadableProperties> staticCache = new HashMap<>();
protected boolean debug; protected boolean debug;
public void init(Map options) { public void init(Map options) {

View File

@ -31,11 +31,7 @@ public class InVMInitialContextFactory implements InitialContextFactory {
// Static -------------------------------------------------------- // Static --------------------------------------------------------
private static Map<Integer, Context> initialContexts; private static final Map<Integer, Context> initialContexts = new HashMap<>();
static {
InVMInitialContextFactory.reset();
}
public static Hashtable<String, String> getJNDIEnvironment() { public static Hashtable<String, String> getJNDIEnvironment() {
return InVMInitialContextFactory.getJNDIEnvironment(0); return InVMInitialContextFactory.getJNDIEnvironment(0);
@ -104,10 +100,6 @@ public class InVMInitialContextFactory implements InitialContextFactory {
} }
} }
public static void reset() {
InVMInitialContextFactory.initialContexts = new HashMap<>();
}
// Package protected --------------------------------------------- // Package protected ---------------------------------------------
// Protected ----------------------------------------------------- // Protected -----------------------------------------------------