Improved: General refactoring and code improvements, package

org.apache.ofbiz.base.config.
(OFBIZ-9935)

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818539 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Brohl
2017-12-18 09:23:30 +00:00
parent 61ba2c6f5b
commit 95b2e68ac7
2 changed files with 5 additions and 3 deletions
@@ -32,7 +32,7 @@ public final class JNDIConfigUtil {
public static final String module = JNDIConfigUtil.class.getName();
private static final String JNDI_CONFIG_XML_FILENAME = "jndiservers.xml";
private static final ConcurrentHashMap<String, JndiServerInfo> jndiServerInfos = new ConcurrentHashMap<String, JndiServerInfo>();
private static final ConcurrentHashMap<String, JndiServerInfo> jndiServerInfos = new ConcurrentHashMap<>();
private JNDIConfigUtil() {};
private static Element getXmlRootElement() throws GenericConfigException {
@@ -50,7 +50,7 @@ public final class JNDIConfigUtil {
Debug.logError(e, "Error loading JNDI config XML file " + JNDI_CONFIG_XML_FILENAME, module);
}
}
public static void initialize(Element rootElement) throws GenericConfigException {
public static void initialize(Element rootElement) {
// jndi-server - jndiServerInfos
for (Element curElement: UtilXml.childElementList(rootElement, "jndi-server")) {
JndiServerInfo jndiServerInfo = new JndiServerInfo(curElement);
@@ -42,7 +42,9 @@ public final class MainResourceHandler implements ResourceHandler {
this.xmlFilename = xmlFilename;
this.loaderName = element.getAttribute("loader");
this.location = element.getAttribute("location");
if (Debug.verboseOn()) Debug.logVerbose("Created " + this.toString(), module);
if (Debug.verboseOn()) {
Debug.logVerbose("Created " + this.toString(), module);
}
}
public MainResourceHandler(String xmlFilename, String loaderName, String location) {