Inspectopedia Help

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); } }
import static foo.Test.WIDTH; class Bar { void bar() { System.out.println(WIDTH); } }

Inspection Details

By default bundled with:

IntelliJ IDEA 2024.1, Qodana for JVM 2024.1,

Can be installed with plugin:

Java, 241.14841

Last modified: 12 March 2024