mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-10 13:17:09 +07:00
do not highlight enum constants as unused when values are used (IDEA-65298 )
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
class UnusedDeclBug {
|
||||
|
||||
public static enum Concern {
|
||||
// These fields are used! Just because I don't mention them by name
|
||||
// doesn't mean they aren't used!
|
||||
// IDEA tells me I need: @SuppressWarnings({"UnusedDeclaration"})
|
||||
LOW,
|
||||
MEDIUM,
|
||||
HIGH;
|
||||
};
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Concerns are:");
|
||||
|
||||
// Invoking Concern.values() should count as using all the fields in the
|
||||
// enum.
|
||||
for (Concern concern : Concern.values()) {
|
||||
System.out.print("\t");
|
||||
System.out.println(concern);
|
||||
} // end for
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user