From 1411a561ab2f1306085d4ce341364a1636ca17f2 Mon Sep 17 00:00:00 2001 From: Sam Harwell Date: Tue, 11 Dec 2012 08:40:40 -0600 Subject: [PATCH] Use EnumSet instead of HashSet --- CHANGES.txt | 1 + tool/src/org/antlr/v4/tool/ErrorManager.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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;