From 7bd53374ed79b300e57bef9af9c3abb0ff3b5c45 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Sat, 25 May 2019 09:15:38 +0000 Subject: [PATCH] =?UTF-8?q?Improved:=20Remove=20unused=20=E2=80=98StringUt?= =?UTF-8?q?il#split=E2=80=99=20overload=20(OFBIZ-11014)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1859923 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/ofbiz/base/util/StringUtil.java | 32 ------------------- 1 file changed, 32 deletions(-) diff --git a/framework/base/src/main/java/org/apache/ofbiz/base/util/StringUtil.java b/framework/base/src/main/java/org/apache/ofbiz/base/util/StringUtil.java index b658ed9ee6..ca00213bb0 100644 --- a/framework/base/src/main/java/org/apache/ofbiz/base/util/StringUtil.java +++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/StringUtil.java @@ -139,38 +139,6 @@ public class StringUtil { return splitList; } - /** - * 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 split(String str, String delim, int limit) { - List 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.