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
artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas
tests/jms-tests/src/test/java/org/apache/activemq/artemis/jms/tests/tools/container

View File

@ -26,7 +26,7 @@ public class PropertiesLoader {
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;
public void init(Map options) {

View File

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