Improved: non functional minor changes to the StringUtil.split(String, String)
method (mostly formatting and unnecessary initialization and type declarations) git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760948 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -135,15 +135,14 @@ public class StringUtil {
|
||||
*/
|
||||
public static List<String> split(String str, String delim) {
|
||||
List<String> splitList = null;
|
||||
StringTokenizer st = null;
|
||||
StringTokenizer st;
|
||||
|
||||
if (str == null) return splitList;
|
||||
if (str == null) return null;
|
||||
|
||||
if (delim != null) st = new StringTokenizer(str, delim);
|
||||
else st = new StringTokenizer(str);
|
||||
st = (delim != null? new StringTokenizer(str, delim): new StringTokenizer(str));
|
||||
|
||||
if (st != null && st.hasMoreTokens()) {
|
||||
splitList = new LinkedList<String>();
|
||||
if (st.hasMoreTokens()) {
|
||||
splitList = new LinkedList<>();
|
||||
|
||||
while (st.hasMoreTokens())
|
||||
splitList.add(st.nextToken());
|
||||
|
||||
Reference in New Issue
Block a user