diff options
author | 2018-05-21 14:43:32 -0700 | |
---|---|---|
committer | 2018-05-21 14:44:52 -0700 | |
commit | 1cbbde90cc9a5667cd57a11e948c86b12ce04855 (patch) | |
tree | 231f1256402e7ca618c069771540ad92c92a6584 /src/main/java/com | |
parent | b1ed9aa8b58aa5400e717e05f090599dad80feeb (diff) |
Remove unused StringUtil method.
PiperOrigin-RevId: 197461794
Diffstat (limited to 'src/main/java/com')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/util/StringUtil.java | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/util/StringUtil.java b/src/main/java/com/google/devtools/build/lib/util/StringUtil.java index 7eb600deda..e7ea821d59 100644 --- a/src/main/java/com/google/devtools/build/lib/util/StringUtil.java +++ b/src/main/java/com/google/devtools/build/lib/util/StringUtil.java @@ -15,12 +15,9 @@ package com.google.devtools.build.lib.util; import com.google.common.base.Joiner; import com.google.common.base.Preconditions; -import com.google.common.base.Splitter; import com.google.common.collect.Iterables; -import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; -import java.util.List; /** * Various utility methods operating on strings. @@ -63,34 +60,6 @@ public class StringUtil { } /** - * Split a single space-separated string into a List of values. - * - * <p>Individual values are canonicalized such that within and - * across calls to this method, equal values point to the same - * object. - * - * <p>If the input is null, return an empty list. - * - * @param in space-separated list of values, eg "value1 value2". - */ - public static List<String> splitAndInternString(String in) { - List<String> result = new ArrayList<>(); - if (in == null) { - return result; - } - for (String val : Splitter.on(' ').omitEmptyStrings().split(in)) { - // Note that splitter returns a substring(), effectively - // retaining the entire "in" String. Make an explicit copy here - // to avoid that memory pitfall. Further, because there may be - // many concurrent submissions that touch the same files, - // attempt to use a single reference for equal strings via the - // deduplicator. - result.add(StringCanonicalizer.intern(val)); - } - return result; - } - - /** * Lists items up to a given limit, then prints how many were omitted. */ public static StringBuilder listItemsWithLimit(StringBuilder appendTo, int limit, |