Inspectopedia Help

Visibility

'public' constructor in non-public class  

Reports public constructors in non-public classes.

Access to inherited field looks like access to element from surrounding code  

Reports access to a superclass field from an anonymous, inner or local class, if a local variable, parameter, or field with the same name is available in the code surrounding the class.

Anonymous class variable hides variable in containing method  

Reports fields in an anonymous class that are named identically to local variables or parameters of the containing method or lambda expression.

Call to inherited method looks like call to local method  

Reports calls to a superclass method from an anonymous, inner or local class, if a method with the same signature exists in the code surrounding the class.

Class is exposed outside of its visibility scope  

Reports usages of classes in a field or method signature where the class has less visibility than the member that uses it.

Empty 'module-info.java' file   New in this release

Reports an empty module-info.java file, indicating unresolved module dependencies.

Inner class field hides outer class field  

Reports inner class fields named identically to a field of a surrounding class.

Lambda parameter hides field  

Reports lambda parameters named identically to a field of a surrounding class.

Local variable hides field  

Reports local variables named identically to a field of a surrounding class.

Method overrides inaccessible method of superclass  

Reports methods with the same signature as an inaccessible method of a superclass, for example, a private method, or a package-private method of a superclass in another package.

Method tries to override 'static' method of superclass  

Reports static methods with a signature identical to a static method of a superclass.

Module exports/opens package to itself  

Reports packages that are exported to, or opened in the same Java 9 module in which they are defined.

Parameter hides field  

Reports method parameters named identically to a field of a surrounding class.

Pattern variable hides field  

Reports pattern variables named identically to a field of a surrounding class.

Possibly unintended overload of method from superclass  

Reports instance methods with the same name and the same number of parameters as a method in a superclass, but where at least one of the parameters is of a different incompatible type.

Subclass field hides superclass field  

Reports fields in a derived class that are named identically a field of a superclass.

Type parameter hides visible type  

Reports type parameters that have the same names as the visible types in the current scope.

Usage of service not declared in 'module-info'  

Reports situations in which a service is loaded with java.util.ServiceLoader but it isn't declared with the uses clause in the module-info.java file and suggests inserting it.

Last modified: 18 June 2024