aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/collect
diff options
context:
space:
mode:
authorGravatar cpeyser <cpeyser@google.com>2018-02-14 13:14:13 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2018-02-14 13:16:13 -0800
commita84e9e4dcc4bdc1a3b3f39605421ff7a451894d6 (patch)
tree91b4736a97697d09ff45c5734a7902444f4849ea /src/main/java/com/google/devtools/build/lib/collect
parent27458be9cd752dd1dfd4d2c8f1bdc421bdbf16bb (diff)
Add a CODEC for CppCompileAction.
PiperOrigin-RevId: 185733313
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/collect')
-rw-r--r--src/main/java/com/google/devtools/build/lib/collect/CollectionUtils.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/collect/CollectionUtils.java b/src/main/java/com/google/devtools/build/lib/collect/CollectionUtils.java
index 369ef52274..9198ba2ba7 100644
--- a/src/main/java/com/google/devtools/build/lib/collect/CollectionUtils.java
+++ b/src/main/java/com/google/devtools/build/lib/collect/CollectionUtils.java
@@ -13,7 +13,7 @@
// limitations under the License.
package com.google.devtools.build.lib.collect;
-import static com.google.common.collect.ImmutableList.toImmutableList;
+import static com.google.common.collect.ImmutableSet.toImmutableSet;
import static java.util.stream.Collectors.toCollection;
import com.google.common.base.Preconditions;
@@ -106,12 +106,11 @@ public final class CollectionUtils {
}
/**
- * Returns an immutable list of all non-null parameters in the order in which
- * they are specified.
+ * Returns an immutable set of all non-null parameters in the order in which they are specified.
*/
@SuppressWarnings("unchecked")
- public static <T> ImmutableList<T> asListWithoutNulls(T... elements) {
- return Arrays.stream(elements).filter(Objects::nonNull).collect(toImmutableList());
+ public static <T> ImmutableSet<T> asSetWithoutNulls(T... elements) {
+ return Arrays.stream(elements).filter(Objects::nonNull).collect(toImmutableSet());
}
/**