Applied patch from jira issue - OFBIZ-7806 - Enforce noninstantiability to UtilProperties class. Thanks Aman Mishra and Rishi Solanki for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1754938 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Arun Patidar
2016-08-02 14:31:39 +00:00
parent 7a0a1dcb79
commit a5d0685903
@@ -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 Serializable {
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