ARTEMIS-2320 Synchronization on a non-final field
This commit is contained in:
parent
f508a25566
commit
4abc2e0430
|
@ -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) {
|
||||||
|
|
|
@ -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 -----------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue