From 9627cbc06c2f055b6067c2da941f07bc8d21a88f Mon Sep 17 00:00:00 2001 From: Adam Heath Date: Wed, 3 Mar 2010 22:12:58 +0000 Subject: [PATCH] Implement proper non-blocking access. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@918728 13f79535-47bb-0310-9956-ffa450edef68 --- framework/base/src/org/ofbiz/base/config/JNDIConfigUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/base/src/org/ofbiz/base/config/JNDIConfigUtil.java b/framework/base/src/org/ofbiz/base/config/JNDIConfigUtil.java index 2c96ad0996..f68d2dffb1 100644 --- a/framework/base/src/org/ofbiz/base/config/JNDIConfigUtil.java +++ b/framework/base/src/org/ofbiz/base/config/JNDIConfigUtil.java @@ -35,7 +35,7 @@ public class JNDIConfigUtil { public static final String module = JNDIConfigUtil.class.getName(); public static final String JNDI_CONFIG_XML_FILENAME = "jndiservers.xml"; - private static final Map jndiServerInfos = FastMap.newInstance(); + private static final FastMap jndiServerInfos = FastMap.newInstance(); private static Element getXmlRootElement() throws GenericConfigException { try { @@ -65,7 +65,7 @@ public class JNDIConfigUtil { for (Element curElement: UtilXml.childElementList(rootElement, "jndi-server")) { JndiServerInfo jndiServerInfo = new JndiServerInfo(curElement); - jndiServerInfos.put(jndiServerInfo.name, jndiServerInfo); + jndiServerInfos.putIfAbsent(jndiServerInfo.name, jndiServerInfo); } }