Skip to content

Commit 3103856

Browse files
committed
Use specialized EnumSet for TypeMatcher instead of generic HashSet. (#207)
1 parent 42cc86f commit 3103856

File tree

1 file changed

+2
-1
lines changed
  • metafix/src/main/java/org/metafacture/metafix

1 file changed

+2
-1
lines changed

metafix/src/main/java/org/metafacture/metafix/Value.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import java.util.ArrayList;
2323
import java.util.Collection;
2424
import java.util.ConcurrentModificationException;
25+
import java.util.EnumSet;
2526
import java.util.HashMap;
2627
import java.util.HashSet;
2728
import java.util.LinkedHashMap;
@@ -304,7 +305,7 @@ enum Type {
304305

305306
public static class TypeMatcher {
306307

307-
private final Set<Type> expected = new HashSet<>();
308+
private final Set<Type> expected = EnumSet.noneOf(Type.class);
308309
private final Value value;
309310

310311
private TypeMatcher(final Value value) {

0 commit comments

Comments
 (0)