Inspectopedia Help

Performance

Name

Language

'Collection.toArray()' call style  

Java

'InputStream' and 'OutputStream' can be constructed using 'Files' methods  

Java

'List.remove()' called in loop  

Java

'Map' can be replaced with 'EnumMap'  

Java

'Set' can be replaced with 'EnumSet'  

Java

'String.equals()' can be replaced with 'String.isEmpty()'  

Java

'StringBuilder' without initial capacity  

Java

'StringBuilder.toString()' in concatenation  

Java

'equals()' call can be replaced with '=='  

Java

Auto-boxing  

Java

Auto-unboxing  

Java

Boolean constructor call  

Java

Boxing of already boxed value  

Java

Bulk 'Files.readAttributes()' call can be used  

Java

Bulk operation can be used instead of iteration  

Java

Call to 'Arrays.asList()' with too few arguments  

Java

Call to 'list.containsAll(collection)' may have poor performance  

Java

Call to 'set.removeAll(list)' may work slowly  

Java

Call to simple getter from within class  

Java

Call to simple setter from within class  

Java

Class initializer may be 'static'  

Java

Collection without initial capacity  

Java

Dynamic regular expression could be replaced by compiled 'Pattern'  

Java

Early loop exit in 'if' condition  

Java

Explicit argument can be lambda  

Java

Field can be made 'static'  

Java

Inefficient Stream API call chains ending with count()  

Java

Instantiating object to get 'Class' object  

Java

Iteration over 'keySet()' can be optimized  

Java

Manual array copy  

Java

Manual array to collection copy  

Java

Method can be made 'static'  

Java

Non-constant 'String' can be replaced with 'StringBuilder'  

Java

Object allocation in loop  

Java

Object instantiation inside 'equals()' or 'hashCode()'  

Java

Redundant 'Collection.addAll()' call  

Java

Redundant call to 'String.format()'  

Java

Single character string argument in 'String.indexOf()' call  

Java

Single character string concatenation  

Java

String concatenation as argument to 'StringBuilder.append()' call  

Java

String concatenation in loop  

Java

Tail recursion  

Java

Unnecessary temporary object in conversion from 'String'  

Java

Unnecessary temporary object in conversion to 'String'  

Java

Using 'Random.nextDouble()' to get random integer  

Java

Wrapper type may be primitive  

Java

Last modified: 13 July 2023