Unnecessarily qualified statically imported element
Reports usage of statically imported members qualified with their containing class name.
Such qualification is unnecessary and can be removed because statically imported members can be accessed directly by member name.
Example:
import static foo.Test.WIDTH;
class Bar {
void bar() {
System.out.println(Test.WIDTH);
}
}
After the quick-fix is applied:
import static foo.Test.WIDTH;
class Bar {
void bar() {
System.out.println(WIDTH);
}
}
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for JVM 2023.3 |
Plugin: | Java, 233.SNAPSHOT |
Last modified: 13 July 2023