org.sonar.l10n.java.rules.squid.S2786.html Maven / Gradle / Ivy
According to the docs:
Nested enum types are implicitly static
.
So there's no need to declare them static
explicitly.
Noncompliant Code Example
public class Flower {
static enum Color { // Noncompliant; static is redundant here
RED, YELLOW, BLUE, ORANGE
}
// ...
}
Compliant Solution
public class Flower {
enum Color { // Compliant
RED, YELLOW, BLUE, ORANGE
}
// ...
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy