Inspectopedia Help

Verbose or redundant code constructs

Name

Language

'StringBuilder' can be replaced with 'String'  

Java

Calls of 'java.time' methods with explicit 'ChronoField' or 'ChronoUnit' arguments can be simplified  

Java

Cast can be replaced with variable  

Java

Comparator method can be simplified  

Java

Concatenation with empty string  

Java

Condition is covered by further condition  

Java

Duplicate branches in 'switch'  

Java

Excessive lambda usage  

Java

Excessive range check  

Java

Explicit array filling  

Java

Expression with 'java.time' 'compareTo()' call can be simplified  

Java

Lombok @Getter may be used  

Java

Lombok @Setter may be used  

Java

Manual min/max calculation  

Java

Multiple occurrences of the same expression  

Java

Non-strict inequality '>=' or '<=' can be replaced with '=='  

Java

Null-check method is called with obviously non-null argument  

Java

Only one element is used  

Java

Optional call chain can be simplified  

Java

Redundant 'Collection' operation  

Java

Redundant 'File' instance creation  

Java

Redundant 'String' operation  

Java

Redundant 'compare()' method call  

Java

Redundant 'isInstance()' or 'cast()' call  

Java

Redundant array creation  

Java

Redundant array length check  

Java

Redundant escape in regex replacement string  

Java

Redundant step in 'Stream' or 'Optional' call chain  

Java

Redundant type arguments  

Java

Redundant type cast  

Java

Redundant usage of unmodifiable collection wrappers  

Java

Replacement operation has no effect  

Java

Simplifiable collector  

Java

Stream API call chain can be simplified  

Java

Too weak variable type leads to unnecessary cast  

Java

Unnecessarily escaped character  

Java

Unnecessary 'break' statement  

Java

Unnecessary 'continue' statement  

Java

Unnecessary 'default' for enum 'switch' statement  

Java

Unnecessary 'return' statement  

Java

Unnecessary label on 'break' statement  

Java

Unnecessary label on 'continue' statement  

Java

Last modified: 13 July 2023