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

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

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

mthl
Author: mthl
Date: Sat May 25 09:15:38 2019
New Revision: 1859923

URL: http://svn.apache.org/viewvc?rev=1859923&view=rev
Log:
Improved: Remove unused ‘StringUtil#split’ overload
(OFBIZ-11014)

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

Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/StringUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/StringUtil.java?rev=1859923&r1=1859922&r2=1859923&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/StringUtil.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/StringUtil.java Sat May 25 09:15:38 2019
@@ -140,38 +140,6 @@ public class StringUtil {
     }
 
     /**
-     * Splits a String on a delimiter into a List of Strings.
-     * @param str the String to split
-     * @param delim the delimiter character(s) to join on (null will split on whitespace)
-     * @param limit see String.split() method
-     * @return a list of Strings
-     */
-    public static List<String> split(String str, String delim, int limit) {
-        List<String> splitList = null;
-        String[] st = null;
-
-        if (str == null) {
-            return splitList;
-        }
-
-        if (delim != null) {
-            st = Pattern.compile(delim).split(str, limit);
-        } else {
-            st = str.split("\\s");
-        }
-
-
-        if (st != null && st.length > 0) {
-            splitList = new LinkedList<>();
-            for (String element : st) {
-                splitList.add(element);
-            }
-        }
-
-        return splitList;
-    }
-
-    /**
      * Encloses each of a List of Strings in quotes.
      * @param list List of String(s) to quote.
      */