aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/collect/CollectionUtils.java
diff options
context:
space:
mode:
authorGravatar Laurent Le Brun <laurentlb@google.com>2015-09-03 13:59:44 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-09-03 14:42:33 +0000
commit54733f93471af0cbe63e9f32a522971dbd193a3e (patch)
treed7ae030fd727d129f80dd137cf6df3f5ba4fba41 /src/main/java/com/google/devtools/build/lib/collect/CollectionUtils.java
parent31d6bba4ec2041926063d26c7b53befcb647e8d5 (diff)
Code cleanup
-- MOS_MIGRATED_REVID=102239051
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/collect/CollectionUtils.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/collect/CollectionUtils.java4
1 files changed, 3 insertions, 1 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 d7b04bb8e0..55c1cad13b 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,6 +13,8 @@
// limitations under the License.
package com.google.devtools.build.lib.collect;
+import static com.google.common.collect.Sets.newEnumSet;
+
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
@@ -189,7 +191,7 @@ public final class CollectionUtils {
}
}
- return result.isEmpty() ? EnumSet.noneOf(clazz) : EnumSet.copyOf(result);
+ return newEnumSet(result, clazz);
}
/**