svn commit: r1751331 - /ofbiz/trunk/framework/common/src/org/ofbiz/common/KeywordSearchUtil.java

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

svn commit: r1751331 - /ofbiz/trunk/framework/common/src/org/ofbiz/common/KeywordSearchUtil.java

Arun Patidar-4
Author: arunpatidar
Date: Mon Jul  4 16:15:33 2016
New Revision: 1751331

URL: http://svn.apache.org/viewvc?rev=1751331&view=rev
Log:
Applied patch from jira issue - OFBIZ-7687 - Enforce noninstantiability to KeywordSearchUtil class. Thanks Chinmay Patidar and Rishi Solanki for your contribution.

Modified:
    ofbiz/trunk/framework/common/src/org/ofbiz/common/KeywordSearchUtil.java

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/KeywordSearchUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/KeywordSearchUtil.java?rev=1751331&r1=1751330&r2=1751331&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/KeywordSearchUtil.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/KeywordSearchUtil.java Mon Jul  4 16:15:33 2016
@@ -37,12 +37,12 @@ import org.ofbiz.entity.util.EntityQuery
 /**
  * A few utility methods related to Keyword Search.
  */
-public class KeywordSearchUtil {
+public final class KeywordSearchUtil {
 
     public static final String module = KeywordSearchUtil.class.getName();
 
-    public static Set<String> thesaurusRelsToInclude = new HashSet<String>();
-    public static Set<String> thesaurusRelsForReplace = new HashSet<String>();
+    private static Set<String> thesaurusRelsToInclude = new HashSet<String>();
+    private static Set<String> thesaurusRelsForReplace = new HashSet<String>();
 
     static {
         thesaurusRelsToInclude.add("KWTR_UF");
@@ -56,6 +56,8 @@ public class KeywordSearchUtil {
         thesaurusRelsForReplace.add("KWTR_CS");
     }
 
+    private KeywordSearchUtil () {}
+
     public static String getSeparators() {
         // String separators = ";: ,.!?\t\"\'\r\n\\/()[]{}*%<>-+_";
         String seps = UtilProperties.getPropertyValue("keywordsearch", "index.keyword.separators", ";: ,.!?\t\"\'\r\n\\/()[]{}*%<>-+_");