According to the docs:
Nested enum types are implicitly
static
.
So there's no need to declare them static
explicitly.
public class Flower { static enum Color { // Noncompliant; static is redundant here RED, YELLOW, BLUE, ORANGE } // ... }
public class Flower { enum Color { // Compliant RED, YELLOW, BLUE, ORANGE } // ... }