diff --git a/CHANGES.txt b/CHANGES.txt index 13454f223..2b0ee2cdc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -7,6 +7,7 @@ December 11, 2012 * Listen for issues reported by StringTemplate, report them as warnings * Fix template issues * GrammarASTWithOptions.getOptions never returns null +* Use EnumSet instead of HashSet December 2, 2012 diff --git a/tool/src/org/antlr/v4/tool/ErrorManager.java b/tool/src/org/antlr/v4/tool/ErrorManager.java index 17c2ff6d4..441cc729d 100644 --- a/tool/src/org/antlr/v4/tool/ErrorManager.java +++ b/tool/src/org/antlr/v4/tool/ErrorManager.java @@ -40,7 +40,7 @@ import org.stringtemplate.v4.misc.STMessage; import java.net.URL; import java.util.Collection; -import java.util.HashSet; +import java.util.EnumSet; import java.util.Locale; import java.util.Set; @@ -52,7 +52,7 @@ public class ErrorManager { public int warnings; /** All errors that have been generated */ - public Set errorTypes = new HashSet(); + public Set errorTypes = EnumSet.noneOf(ErrorType.class); /** The group of templates that represent the current message format. */ STGroup format;