Inspectopedia 2024.3 Help

Abstraction issues

'Optional' used as field or parameter type   New in this release

Reports any cases in which java.util.Optional<T>, java.util.OptionalDouble, java.util.OptionalInt, java.util.OptionalLong, or com.google.common.base.Optional are used as types for fields or parameters.

'instanceof' check for 'this'   New in this release

Reports usages of instanceof or getClass() == SomeClass.class in which a this expression is checked.

'public' method not exposed in interface   New in this release

Reports public methods in classes which are not exposed in an interface.

'public' method with 'boolean' parameter   New in this release

Reports public methods that accept a boolean parameter.

Chain of 'instanceof' checks   New in this release

Reports any chains of if-else statements all of whose conditions are instanceof expressions or class equality expressions (e.g.

Class references one of its subclasses   New in this release

Reports classes which contain references to one of their subclasses.

Collection declared by class, not interface   New in this release

Reports declarations of Collection variables made by using the collection class as a type, rather than an appropriate interface.

Feature envy   New in this release

Reports the Feature Envy code smell.

Interface method clashes with method in 'Object'   New in this release

Reports interface methods that clash with the protected methods clone() and finalize() from the java.lang.Object class.

Magic number  

Reports "magic numbers": numeric literals that are not named by a constant declaration.

Overly strong type cast   New in this release

Reports type casts that are overly strong.

Private method only used from inner class   New in this release

Reports private methods which are only called from an inner class of the class containing the method.

Static member only used from one other class   New in this release

Reports static methods and fields that are only used from a class other than the containing class.

Type may be weakened   New in this release

Reports variable and method return types that can be changed to a more abstract (weaker) type.

Use of concrete class   New in this release

Reports usages of concrete classes, rather than interfaces.

Last modified: 11 September 2024