Showing
1 changed file
with
1 additions
and
1 deletions
@@ -19,7 +19,7 @@ public class Strings { | @@ -19,7 +19,7 @@ public class Strings { | ||
19 | public static List<Integer> split(String str, String delimiter) { | 19 | public static List<Integer> split(String str, String delimiter) { |
20 | List<Integer> values = null; | 20 | List<Integer> values = null; |
21 | if (org.apache.commons.lang3.StringUtils.isNotEmpty(str)) { | 21 | if (org.apache.commons.lang3.StringUtils.isNotEmpty(str)) { |
22 | - values = Splitter.on(delimiter).splitToList(str).stream().map(Integer::valueOf).collect(Collectors.toList()); | 22 | + values = Splitter.on(delimiter).omitEmptyStrings().splitToList(str).stream().map(Integer::valueOf).collect(Collectors.toList()); |
23 | } | 23 | } |
24 | return values; | 24 | return values; |
25 | } | 25 | } |
-
Please register or login to post a comment