Re: svn commit: r1714691 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1714691 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java

Adrian Crum-3
If Java code is retrieving a setting, then it is best to specify the
.properties extension. If Java code is retrieving a UI label, then it is
best to leave the extension off (so both .properties and .xml files can
be parsed). This is a best practice for the OFBiz framework (because of
how various framework things work), but it is not a best practice for
Java in general.

Adrian Crum
Sandglass Software
www.sandglass-software.com

On 11/16/2015 2:00 PM, [hidden email] wrote:

> Author: jleroux
> Date: Mon Nov 16 22:00:52 2015
> New Revision: 1714691
>
> URL: http://svn.apache.org/viewvc?rev=1714691&view=rev
> Log:
> Fixed a bug introduced w/ r1714652 (not sure on this one but better safe than sorry)
>
> Modified:
>      ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java
>
> Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java?rev=1714691&r1=1714690&r2=1714691&view=diff
> ==============================================================================
> --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java (original)
> +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilXml.java Mon Nov 16 22:00:52 2015
> @@ -1010,7 +1010,7 @@ public class UtilXml {
>           public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
>               //Debug.logInfo("resolving XML entity with publicId [" + publicId + "], systemId [" + systemId + "]", module);
>               hasDTD = false;
> -            String dtd = UtilProperties.getSplitPropertyValue(UtilURL.fromResource("localdtds"), publicId);
> +            String dtd = UtilProperties.getSplitPropertyValue(UtilURL.fromResource("localdtds.properties"), publicId);
>               if (UtilValidate.isNotEmpty(dtd)) {
>                   if (Debug.verboseOn()) Debug.logVerbose("[UtilXml.LocalResolver.resolveEntity] resolving DTD with publicId [" + publicId +
>                           "], systemId [" + systemId + "] and the dtd file is [" + dtd + "]", module);
>
>