You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ar...@apache.org on 2016/08/02 14:31:39 UTC

svn commit: r1754938 - /ofbiz/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java

Author: arunpatidar
Date: Tue Aug  2 14:31:39 2016
New Revision: 1754938

URL: http://svn.apache.org/viewvc?rev=1754938&view=rev
Log:
Applied patch from jira issue - OFBIZ-7806 - Enforce noninstantiability to UtilProperties class. Thanks Aman Mishra and Rishi Solanki for your contribution.

Modified:
    ofbiz/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java

Modified: ofbiz/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java?rev=1754938&r1=1754937&r2=1754938&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java (original)
+++ ofbiz/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java Tue Aug  2 14:31:39 2016
@@ -63,10 +63,12 @@ import org.w3c.dom.Element;
  * method).</p>
  */
 @SuppressWarnings("serial")
-public class UtilProperties implements Serializable {
+public final class UtilProperties implements Serializable {
 
     public static final String module = UtilProperties.class.getName();
 
+    private UtilProperties() {}
+
     /**
      * A cache for storing Properties instances. Each Properties instance is keyed by its URL.
      */
@@ -666,7 +668,7 @@ public class UtilProperties implements S
         return getMessage(resource, name, UtilGenerics.toMap(String.class, context), locale);
     }
 
-    protected static Set<String> resourceNotFoundMessagesShown = new HashSet<String>();
+    private static Set<String> resourceNotFoundMessagesShown = new HashSet<String>();
     /** Returns the specified resource/properties file as a ResourceBundle
      * @param resource The name of the resource - can be a file, class, or URL
      * @param locale The locale that the given resource will correspond to