8156984: JShell tool: for (FormatCase e : EnumSet.allOf(FormatCase.class))
Summary: Replacde EnumSet.allOf(FormatCase.class) with FormatCase.all
Reviewed-by: rfield
--- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/Feedback.java Fri Aug 26 15:54:36 2016 -0700
+++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/Feedback.java Mon Aug 29 09:58:42 2016 +0000
@@ -147,17 +147,17 @@
}
{
- for (FormatCase e : EnumSet.allOf(FormatCase.class))
+ for (FormatCase e : FormatCase.all)
selectorMap.put(e.name().toLowerCase(Locale.US), e);
- for (FormatAction e : EnumSet.allOf(FormatAction.class))
+ for (FormatAction e : FormatAction.all)
selectorMap.put(e.name().toLowerCase(Locale.US), e);
- for (FormatResolve e : EnumSet.allOf(FormatResolve.class))
+ for (FormatResolve e : FormatResolve.all)
selectorMap.put(e.name().toLowerCase(Locale.US), e);
- for (FormatUnresolved e : EnumSet.allOf(FormatUnresolved.class))
+ for (FormatUnresolved e : FormatUnresolved.all)
selectorMap.put(e.name().toLowerCase(Locale.US), e);
- for (FormatErrors e : EnumSet.allOf(FormatErrors.class))
+ for (FormatErrors e : FormatErrors.all)
selectorMap.put(e.name().toLowerCase(Locale.US), e);
- for (FormatWhen e : EnumSet.allOf(FormatWhen.class))
+ for (FormatWhen e : FormatWhen.all)
selectorMap.put(e.name().toLowerCase(Locale.US), e);
}