diff --git a/modernizer-maven-plugin/src/main/resources/modernizer.xml b/modernizer-maven-plugin/src/main/resources/modernizer.xml
index f428674c..12862db8 100644
--- a/modernizer-maven-plugin/src/main/resources/modernizer.xml
+++ b/modernizer-maven-plugin/src/main/resources/modernizer.xml
@@ -533,6 +533,12 @@ violation names use the same format that javap emits.
Prefer java.util.Collections.emptySet()
+
+ java/util/Enumeration
+ 2
+ Prefer java.util.Iterator
+
+
java/util/Hashtable."<init>":(IF)V
2
diff --git a/modernizer-maven-plugin/src/test/java/org/gaul/modernizer_maven_plugin/ModernizerTest.java b/modernizer-maven-plugin/src/test/java/org/gaul/modernizer_maven_plugin/ModernizerTest.java
index 0b2a8d44..e980f46e 100644
--- a/modernizer-maven-plugin/src/test/java/org/gaul/modernizer_maven_plugin/ModernizerTest.java
+++ b/modernizer-maven-plugin/src/test/java/org/gaul/modernizer_maven_plugin/ModernizerTest.java
@@ -40,6 +40,7 @@
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
+import java.util.Enumeration;
import java.util.Formatter;
import java.util.Hashtable;
import java.util.Locale;
@@ -418,6 +419,8 @@ public void testAllViolations() throws Exception {
occurrences.addAll(modernizer.check(
new ClassReader(Java19Violations.class.getName())));
// must visit inner classes manually
+ occurrences.addAll(modernizer.check(
+ new ClassReader(EnumerationTestClass.class.getName())));
occurrences.addAll(modernizer.check(
new ClassReader(VoidFunction.class.getName())));
occurrences.addAll(modernizer.check(
@@ -516,6 +519,14 @@ private static class StringGetBytesCharset {
private final Object object = "".getBytes(StandardCharsets.UTF_8);
}
+ private static class EnumerationTestClass implements Enumeration