IntelliJ IDEA 2021.1 Help

List of Java inspections

Arquillian

Inspection nameDefault stateDefault severity
Arquillian test class should be properly preparedthe Enabled checkbox EnabledError icon Error
Arquillian test class should have method with @Deployment annotationthe Enabled checkbox EnabledError icon Error
Arquillian test class should have only one method with @Deployment annotationthe Enabled checkbox EnabledError icon Error
Wrong return type of @Deployment methodthe Enabled checkbox EnabledError icon Error
Wrong signature of @Deployment methodthe Enabled checkbox EnabledError icon Error

Abstraction issues

Inspection nameDefault stateDefault severity
Cast to a concrete classthe Disabled checkbox DisabledWarning icon Warning
Chain of instanceof checksthe Disabled checkbox DisabledWarning icon Warning
Class references one of its subclassesthe Disabled checkbox DisabledWarning icon Warning
Feature envythe Disabled checkbox DisabledWarning icon Warning
instanceof a concrete classthe Disabled checkbox DisabledWarning icon Warning
instanceof check for thisthe Disabled checkbox DisabledWarning icon Warning
Interface method clashes with method in java.lang.Objectthe Enabled checkbox EnabledWarning icon Warning
Local variable of concrete classthe Disabled checkbox DisabledWarning icon Warning
Magic numberthe Disabled checkbox DisabledWarning icon Warning
Method parameter to concrete classthe Disabled checkbox DisabledWarning icon Warning
Method return of concrete classthe Disabled checkbox DisabledWarning icon Warning
Optional used as field or parameter typethe Enabled checkbox EnabledWarning icon Warning
Overly strong type castthe Disabled checkbox DisabledWarning icon Warning
Private method only used from inner classthe Disabled checkbox DisabledWarning icon Warning
public method not exposed in interfacethe Disabled checkbox DisabledWarning icon Warning
public method with boolean parameterthe Disabled checkbox DisabledWarning icon Warning
Static field of concrete classthe Disabled checkbox DisabledWarning icon Warning
Static member used only from one other classthe Disabled checkbox DisabledWarning icon Warning
Type may be weakenedthe Disabled checkbox DisabledWarning icon Warning
Type of instance field is concrete classthe Disabled checkbox DisabledWarning icon Warning

Assignment issues

Inspection nameDefault stateDefault severity
Assignment replaceable with operator assignmentthe Disabled checkbox DisabledWarning icon Warning
Assignment to for loop parameterthe Disabled checkbox DisabledWarning icon Warning
Assignment to catch block parameterthe Disabled checkbox DisabledWarning icon Warning
Assignment to lambda parameterthe Disabled checkbox DisabledWarning icon Warning
Assignment to method parameterthe Disabled checkbox DisabledWarning icon Warning
Assignment to static field from instance contextthe Disabled checkbox DisabledWarning icon Warning
Assignment used as conditionthe Disabled checkbox DisabledWarning icon Warning
Constructor assigns value to field defined in superclassthe Disabled checkbox DisabledWarning icon Warning
null assignmentthe Disabled checkbox DisabledWarning icon Warning
Results of assignment usedthe Disabled checkbox DisabledWarning icon Warning
Value of ++ or -- usedthe Disabled checkbox DisabledWarning icon Warning

Bitwise operation issues

Inspection nameDefault stateDefault severity
Incompatible bitwise mask operationthe Enabled checkbox EnabledWarning icon Warning
Pointless bitwise expressionthe Enabled checkbox EnabledWarning icon Warning
Shift operation by inappropriate constantthe Enabled checkbox EnabledWarning icon Warning

Class metrics

Inspection nameDefault stateDefault severity
Anonymous inner class with too many methodsthe Disabled checkbox DisabledWarning icon Warning
Class too deep in inheritance treethe Disabled checkbox DisabledWarning icon Warning
Class with too many constructorsthe Disabled checkbox DisabledWarning icon Warning
Class with too many fieldsthe Disabled checkbox DisabledWarning icon Warning
Class with too many methodsthe Disabled checkbox DisabledWarning icon Warning
Inner class too deeply nestedthe Disabled checkbox DisabledWarning icon Warning
Overly complex anonymous classthe Disabled checkbox DisabledWarning icon Warning
Overly complex classthe Disabled checkbox DisabledWarning icon Warning
Overly coupled classthe Disabled checkbox DisabledWarning icon Warning

Class structure

Inspection nameDefault stateDefault severity
Abstract class may be interfacethe Enabled checkbox EnabledInfo icon No highlighting, only fix
Anonymous inner classthe Disabled checkbox DisabledWarning icon Warning
Class may extend adapter instead of implementing listenerthe Disabled checkbox DisabledWarning icon Warning
Class name differs from file namethe Disabled checkbox DisabledWarning icon Warning
Class with only private constructors should be declared finalthe Disabled checkbox DisabledWarning icon Warning
Constant declared in abstract classthe Disabled checkbox DisabledWarning icon Warning
Constant declared in interfacethe Disabled checkbox DisabledWarning icon Warning
Empty classthe Disabled checkbox DisabledWarning icon Warning
Field can be localthe Enabled checkbox EnabledWarning icon Warning
final classthe Disabled checkbox DisabledWarning icon Warning
final methodthe Disabled checkbox DisabledWarning icon Warning
final method in final classthe Disabled checkbox DisabledWarning icon Warning
Inner class of interfacethe Disabled checkbox DisabledWarning icon Warning
Interface may be annotated @FunctionalInterfacethe Disabled checkbox DisabledWarning icon Warning
Limited-scope inner classthe Disabled checkbox DisabledWarning icon Warning
Marker interfacethe Disabled checkbox DisabledWarning icon Warning
Method returns per-class constant the Inspect Code iconthe Disabled checkbox DisabledWarning icon Warning
Multiple top level classes in single filethe Disabled checkbox DisabledWarning icon Warning
Non-op method in abstract classthe Disabled checkbox DisabledWarning icon Warning
Non- final field in enumthe Disabled checkbox DisabledWarning icon Warning
Non- static initializerthe Disabled checkbox DisabledWarning icon Warning
Parameter can be localthe Enabled checkbox EnabledWarning icon Warning
private method declared finalthe Enabled checkbox EnabledWarning icon Warning
private method in final classthe Disabled checkbox DisabledWarning icon Warning
public constructorthe Disabled checkbox DisabledWarning icon Warning
public constructor in non-public classthe Disabled checkbox DisabledWarning icon Warning
Singletonthe Disabled checkbox DisabledWarning icon Warning
static, non- final fieldthe Disabled checkbox DisabledWarning icon Warning
static method declared finalthe Enabled checkbox EnabledWarning icon Warning
Utility classthe Disabled checkbox DisabledWarning icon Warning
Utility class can be enumthe Disabled checkbox DisabledWarning icon Warning
Utility class is not finalthe Disabled checkbox DisabledWarning icon Warning
Utility class with public constructorthe Disabled checkbox DisabledWarning icon Warning
Utility class without public constructorthe Disabled checkbox DisabledWarning icon Warning

Inspections labeled with the Inspect Code icon are not available in the editor and can be launched via Analyze | Inspect Code or Analyze | Run Inspection By Name.

Cloning issues

Inspection nameDefault stateDefault severity
clone() does not declare CloneNotSupportedExceptionthe Enabled checkbox EnabledWarning icon Warning
clone() instantiates objects with constructorthe Disabled checkbox DisabledWarning icon Warning
clone() method in non-Cloneabe classthe Disabled checkbox DisabledWarning icon Warning
clone() method in non-Cloneabe classthe Disabled checkbox DisabledWarning icon Warning
clone() method not publicthe Disabled checkbox DisabledWarning icon Warning
clone() should have return type equal to the class it containsthe Disabled checkbox DisabledWarning icon Warning
Cloneable class without clone() methodthe Disabled checkbox DisabledWarning icon Warning
Use of clone() Cloneablethe Disabled checkbox DisabledWarning icon Warning

Code maturity

Inspection nameDefault stateDefault severity
Call to printStackTrace()the Disabled checkbox DisabledWarning icon Warning
Call to Thread.dumpStack()the Disabled checkbox DisabledWarning icon Warning
Deprecated API usagethe Enabled checkbox EnabledWarning icon Warning
Deprecated method is still usedthe Enabled checkbox EnabledWarning icon Warning
Inspection suppression annotationthe Disabled checkbox DisabledWarning icon Warning
Throwable printed to System.outthe Enabled checkbox EnabledWarning icon Warning
Usage of API marked for removalthe Enabled checkbox EnabledError icon Error
Use of obsolete collection typethe Disabled checkbox DisabledWarning icon Warning
Use of obsolete date-time APIthe Disabled checkbox DisabledWarning icon Warning
Use of System.out or System.errthe Disabled checkbox DisabledWarning icon Warning

Code style issues

Inspection nameDefault stateDefault severity
Array can be replaced with enum valuesthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Array creation without new expressionthe Enabled checkbox EnabledInfo icon No highlighting, only fix
assert message is not a Stringthe Disabled checkbox DisabledWarning icon Warning
Assignment can be joined with declarationthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Block marker commentthe Disabled checkbox DisabledWarning icon Warning
C-style array declarationthe Enabled checkbox EnabledWarning icon Warning
Call to String.concat() can be replaced with +the Disabled checkbox DisabledWarning icon Warning
Can use bounded wildcardthe Disabled checkbox DisabledWarning icon Warning
Chained equality comparisonsthe Disabled checkbox DisabledWarning icon Warning
Chained method callsthe Disabled checkbox DisabledWarning icon Warning
Class explicitly extends java.lang.Objectthe Enabled checkbox EnabledWarning icon Warning
Code block contains single statementthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Conditional can be replaced with Optionalthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Confusing octal escape sequencethe Disabled checkbox DisabledWarning icon Warning
Constant expression can be evaluatedthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Constant on the wrong side of comparisonthe Disabled checkbox DisabledWarning icon Warning
Control flow statement without bracesthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Diamond can be replaced with explicit type argumentsthe Enabled checkbox EnabledInfo icon No highlighting, only fix
equals() called on Enum valuethe Disabled checkbox DisabledWarning icon Warning
expression.equals("literal") rather than "literal".equals(expression)the Disabled checkbox DisabledWarning icon Warning
Field assignment can be moved to initializerthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Field can be Finalthe Disabled checkbox DisabledWarning icon Warning
If statement can be replaced with ?:, && or || expressionthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Implicit call to super()the Disabled checkbox DisabledWarning icon Warning
Instance field access not qualified with thisthe Disabled checkbox DisabledWarning icon Warning
Instance field access not qualified with thisthe Disabled checkbox DisabledWarning icon Warning
Labeled switch rule can have code blockthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Labeled switch rule has redundant code blockthe Enabled checkbox EnabledWarning icon Warning
Lambda body can be code blockthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Lambda can be replaced with anonymous classthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Lambda parameter type can be specifiedthe Enabled checkbox EnabledInfo icon No highlighting, only fix
'List.indexOf()' expression is replaceable with contains()the Disabled checkbox DisabledWarning icon Warning
Local variable or parameter can be finalthe Disabled checkbox DisabledWarning icon Warning
Method reference can be replaced with lambdathe Enabled checkbox EnabledInfo icon No highlighting, only fix
Missorted modifiersthe Disabled checkbox DisabledWarning icon Warning
Multi-catch can be split into separate catch blocksthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Multiple variables in one declarationthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Nested method callthe Disabled checkbox DisabledWarning icon Warning
Null value for Optional typethe Enabled checkbox EnabledWarning icon Warning
Objects.equals() can be replaced with equals()the Enabled checkbox EnabledInfo icon No highlighting, only fix
Optional can be replaced with sequence of if statementsthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Optional contains array or collectionthe Disabled checkbox DisabledWarning icon Warning
Optional.isPresent() can be replaced with functional-style expressionthe Enabled checkbox EnabledWarning icon Warning
Raw type can be genericthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Redundant new expression in constant array creationthe Disabled checkbox DisabledWarning icon Warning
Redundant field initializationthe Disabled checkbox DisabledWarning icon Warning
Redundant interface declarationthe Disabled checkbox DisabledWarning icon Warning
Redundant no-arg constructorthe Disabled checkbox DisabledWarning icon Warning
return separated from the result computationthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Return of thisthe Disabled checkbox DisabledWarning icon Warning
Simplifiable annotationthe Disabled checkbox DisabledWarning icon Warning
Single-element annotationthe Enabled checkbox EnabledInfo icon No highlighting, only fix
size() == 0 replaceable with isEmpty()the Disabled checkbox DisabledWarning icon Warning
Standard Charset object can be usedthe Enabled checkbox EnabledWarning icon Warning
Stream API call chain can be replaced with loopthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Subsequent steps can be fused into Stream API chainthe Enabled checkbox EnabledWarning icon Warning
try statement with multiple resources can be splitthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Type parameter explicitly extends java.lang.Objectthe Enabled checkbox EnabledWarning icon Warning
Unclear expressionthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Unnecessarily qualified inner class accessthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Unnecessarily qualified static accessthe Disabled checkbox DisabledWarning icon Warning
Unnecessarily qualified statically imported elementthe Disabled checkbox DisabledWarning icon Warning
Unnecessary final on local variable or parameterthe Disabled checkbox DisabledWarning icon Warning
Unnecessary null check before equals() callthe Disabled checkbox DisabledWarning icon Warning
Unnecessary super qualifierthe Disabled checkbox DisabledWarning icon Warning
Unnecessary this qualifierthe Disabled checkbox DisabledWarning icon Warning
Unnecessary call to super()the Disabled checkbox DisabledWarning icon Warning
Unnecessary call to toString()the Disabled checkbox DisabledWarning icon Warning
Unnecessary code blockthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Unnecessary conversion to Stringthe Enabled checkbox EnabledWarning icon Warning
Unnecessary enum modifierthe Enabled checkbox EnabledWarning icon Warning
Unnecessary fully qualified namethe Enabled checkbox EnabledInfo icon No highlighting, only fix
Unnecessary interface modifierthe Enabled checkbox EnabledWarning icon Warning
Unnecessary parenthesesthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Unnecessary qualifier for this or superthe Disabled checkbox DisabledWarning icon Warning
Unnecessary semicolonthe Enabled checkbox EnabledWarning icon Warning
Unqualified inner class accessthe Disabled checkbox DisabledWarning icon Warning
Unqualified static accessthe Disabled checkbox DisabledWarning icon Warning

Compiler issues

Inspection nameDefault stateDefault severity
Javac quirksthe Enabled checkbox EnabledWarning icon Warning
Unchecked warningthe Enabled checkbox EnabledWarning icon Warning

Concurrency annotation issues

Inspection nameDefault stateDefault severity
Instance member guarded by static fieldthe Disabled checkbox DisabledWarning icon Warning
Non-final @GuardedBy fieldthe Disabled checkbox DisabledWarning icon Warning
Non-final field in @Immutable classthe Disabled checkbox DisabledWarning icon Warning
Static member guarded by instance filed or thisthe Disabled checkbox DisabledWarning icon Warning
Unguarded field accessthe Disabled checkbox DisabledWarning icon Warning
Unknown @GuardedBy fieldthe Disabled checkbox DisabledWarning icon Warning

Control flow issues

Inspection nameDefault stateDefault severity
Assertion can be replaced with if statementthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Boolean expression could be replaced with conditional expressionthe Disabled checkbox DisabledWarning icon Warning
break statement with labelthe Disabled checkbox DisabledWarning icon Warning
break statementthe Disabled checkbox DisabledWarning icon Warning
Conditional break inside infinite loopthe Enabled checkbox EnabledWarning icon Warning
Conditional can be pushed inside branch expressionthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Conditional expression (?:)the Enabled checkbox EnabledInfo icon No highlighting, only fix
Conditional expression with identical branchesthe Disabled checkbox DisabledWarning icon Warning
Conditional expression with negated conditionthe Disabled checkbox DisabledWarning icon Warning
Constant conditional expressionthe Enabled checkbox EnabledWarning icon Warning
continue statement with labelthe Disabled checkbox DisabledWarning icon Warning
continue statementthe Disabled checkbox DisabledWarning icon Warning
default not last case in switch statementthe Disabled checkbox DisabledWarning icon Warning
Double negationthe Enabled checkbox EnabledWarning icon Warning
Duplicate condition in if statementthe Enabled checkbox EnabledWarning icon Warning
Duplicate condition on && or ||the Disabled checkbox DisabledWarning icon Warning
Enum switch statement that misses casethe Enabled checkbox EnabledInfo icon No highlighting, only fix
Fallthrough in switch statementthe Disabled checkbox DisabledWarning icon Warning
for loop may be replaced with while loopthe Enabled checkbox EnabledInfo icon No highlighting, only fix
for loop with missing componentsthe Disabled checkbox DisabledWarning icon Warning
Idempotent loop bodythe Enabled checkbox EnabledWarning icon Warning
if statement could be replaced with conditional expressionthe Disabled checkbox DisabledWarning icon Warning
if statement with common partsthe Enabled checkbox EnabledWeak Warning icon Weak Warning
if statement with negated conditionthe Disabled checkbox DisabledWarning icon Warning
if statement with too many branchesthe Disabled checkbox DisabledWarning icon Warning
Infinite loop statementthe Enabled checkbox EnabledWarning icon Warning
Labeled statementthe Disabled checkbox DisabledWarning icon Warning
Local variable used and declared in different switch branchesthe Disabled checkbox DisabledWarning icon Warning
Loop statement that does not loopthe Enabled checkbox EnabledWarning icon Warning
Loop variable not updated inside loopthe Enabled checkbox EnabledWarning icon Warning
Loop with implicit termination conditionthe Disabled checkbox DisabledWarning icon Warning
Negated conditional expressionthe Disabled checkbox DisabledWarning icon Warning
Negated equality expressionthe Disabled checkbox DisabledWarning icon Warning
Nested switchthe Disabled checkbox DisabledWarning icon Warning
Nested conditional expressionthe Disabled checkbox DisabledWarning icon Warning
Overly complex boolean expressionthe Disabled checkbox DisabledWarning icon Warning
Pointless indexOf() comparisonthe Disabled checkbox DisabledWarning icon Warning
Pointless boolean expressionthe Enabled checkbox EnabledWarning icon Warning
Redundant elsethe Enabled checkbox EnabledInfo icon No highlighting, only fix
Redundant if statementthe Enabled checkbox EnabledWarning icon Warning
Redundant conditional expressionthe Enabled checkbox EnabledWarning icon Warning
Simplifiable boolean expressionthe Enabled checkbox EnabledWarning icon Warning
Simplifiable conditional expressionthe Enabled checkbox EnabledWarning icon Warning
Statement can be replaced with assert or Objects.requireNonNullthe Enabled checkbox EnabledInfo icon No highlighting, only fix
switch statementthe Disabled checkbox DisabledWarning icon Warning
switch statement with too few branchesthe Enabled checkbox EnabledWarning icon Warning
switch statement with too low of a branch densitythe Disabled checkbox DisabledWarning icon Warning
switch statement with too many branchesthe Disabled checkbox DisabledWarning icon Warning
switch statement without default branchthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Unnecessary null check before method callthe Enabled checkbox EnabledWarning icon Warning

Data flow

Inspection nameDefault stateDefault severity
Boolean method is always invertedthe Enabled checkbox EnabledWarning icon Warning
Boolean variable is always invertedthe Disabled checkbox DisabledWarning icon Warning
Method call violates Law of Demeterthe Disabled checkbox DisabledWarning icon Warning
Negatively named boolean variablethe Disabled checkbox DisabledWarning icon Warning
Redundant local variablethe Enabled checkbox EnabledWarning icon Warning
Reuse of local variablethe Disabled checkbox DisabledWarning icon Warning
Scope of variable is too broadthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Use of variable whose value is known to be constantthe Disabled checkbox DisabledWarning icon Warning

Declaration redundancy

Inspection nameDefault stateDefault severity
Access static member via instance referencethe Enabled checkbox EnabledWarning icon Warning
Actual method parameter is the same constantthe Enabled checkbox EnabledWarning icon Warning
Collector can be simplifiedthe Enabled checkbox EnabledWarning icon Warning
Declaration access can be weakerthe Disabled checkbox DisabledWarning icon Warning
Declaration can have final modifier the Inspect Code iconthe Enabled checkbox EnabledWarning icon Warning
Default annotation parameter valuethe Enabled checkbox EnabledWarning icon Warning
Duplicate throwsthe Enabled checkbox EnabledWarning icon Warning
Empty method the Inspect Code iconthe Enabled checkbox EnabledWarning icon Warning
Functional expression can be foldedthe Enabled checkbox EnabledWarning icon Warning
Method can be voidthe Enabled checkbox EnabledWarning icon Warning
Method returns the same value the Inspect Code iconthe Enabled checkbox EnabledWarning icon Warning
Null-check method is called with obviously non-null argumentthe Enabled checkbox EnabledWarning icon Warning
Optional call chain can be simplifiedthe Enabled checkbox EnabledWarning icon Warning
Redundant close()the Enabled checkbox EnabledWarning icon Warning
Redundant requires statement in module-info the Inspect Code iconthe Enabled checkbox EnabledWarning icon Warning
Redundant throws clausethe Enabled checkbox EnabledWarning icon Warning
Redundant lambda parameter typesthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Redundant operation on empty containerthe Enabled checkbox EnabledWarning icon Warning
Redundant step in Stream or Optional call chainthe Enabled checkbox EnabledWarning icon Warning
Stream API call chain can be simplifiedthe Enabled checkbox EnabledWarning icon Warning
Trivial usage of functional expressionthe Enabled checkbox EnabledWarning icon Warning
Unnecessary module dependencythe Enabled checkbox EnabledWarning icon Warning
Unused declarationthe Enabled checkbox EnabledWarning icon Warning
Unused labelthe Enabled checkbox EnabledWarning icon Warning
Variable is assigned to itselfthe Enabled checkbox EnabledWarning icon Warning
Wrapper type may be primitivethe Enabled checkbox EnabledWarning icon Warning

Inspections labeled with the Inspect Code icon are not available in the editor and can be launched via Analyze | Inspect Code or Analyze | Run Inspection By Name.

Dependency issues

Inspection nameDefault stateDefault severity
Class with too many dependencies the Inspect Code iconthe Disabled checkbox DisabledWarning icon Warning
Class with too many dependents the Inspect Code iconthe Disabled checkbox DisabledWarning icon Warning
Class with too many transitive dependencies the Inspect Code iconthe Disabled checkbox DisabledWarning icon Warning
Class with too many transitive dependents the Inspect Code iconthe Disabled checkbox DisabledWarning icon Warning
Cyclic class dependency the Inspect Code iconthe Disabled checkbox DisabledWarning icon Warning
Cyclic package dependency the Inspect Code iconthe Disabled checkbox DisabledWarning icon Warning
Illegal package dependenciesthe Enabled checkbox EnabledError icon Error
Suspicious package-private accessthe Disabled checkbox DisabledWarning icon Warning

Inspections labeled with the Inspect Code icon are not available in the editor and can be launched via Analyze | Inspect Code or Analyze | Run Inspection By Name.

Encapsulation

Inspection nameDefault stateDefault severity
Accessing a non-public field of another objectthe Disabled checkbox DisabledWarning icon Warning
Assignment or return of field with mutable typethe Disabled checkbox DisabledWarning icon Warning
Package-visible fieldthe Disabled checkbox DisabledWarning icon Warning
Package-visible nested classthe Disabled checkbox DisabledWarning icon Warning
Protected fieldthe Disabled checkbox DisabledWarning icon Warning
Protected nested classthe Disabled checkbox DisabledWarning icon Warning
public fieldthe Enabled checkbox EnabledInfo icon No highlighting, only fix
public nested classthe Disabled checkbox DisabledWarning icon Warning

Error handling

Inspection nameDefault stateDefault severity
Catch block may ignore exceptionthe Enabled checkbox EnabledWarning icon Warning
Caught exception is immediately rethrownthe Enabled checkbox EnabledWarning icon Warning
Checked exception classthe Disabled checkbox DisabledWarning icon Warning
Class directly extends java.lang.Throwablethe Disabled checkbox DisabledWarning icon Warning
continue or break inside finally blockthe Enabled checkbox EnabledWarning icon Warning
Empty finally blockthe Enabled checkbox EnabledWarning icon Warning
Empty try blockthe Enabled checkbox EnabledWarning icon Warning
Exception constructor called without argumentsthe Disabled checkbox DisabledWarning icon Warning
finally block which cannot complete normallythe Enabled checkbox EnabledWarning icon Warning
instanceof on catch parameterthe Disabled checkbox DisabledWarning icon Warning
java.lang.Error not rethrownthe Disabled checkbox DisabledWarning icon Warning
java.lang.ThreadDeath not rethrownthe Disabled checkbox DisabledWarning icon Warning
Nested try statementthe Disabled checkbox DisabledWarning icon Warning
Non-final field of exception classthe Disabled checkbox DisabledWarning icon Warning
null thrownthe Disabled checkbox DisabledWarning icon Warning
Overly broad catch blockthe Disabled checkbox DisabledWarning icon Warning
Overly broad throws clausethe Disabled checkbox DisabledWarning icon Warning
Prohibited exception caughtthe Disabled checkbox DisabledWarning icon Warning
Prohibited exception declaredthe Disabled checkbox DisabledWarning icon Warning
Prohibited exception thrownthe Disabled checkbox DisabledWarning icon Warning
return inside finally blockthe Enabled checkbox EnabledWarning icon Warning
throw caught by containing try statementthe Disabled checkbox DisabledWarning icon Warning
throw inside catch block which ignores the caught exceptionthe Disabled checkbox DisabledWarning icon Warning
throw inside finally blockthe Enabled checkbox EnabledWarning icon Warning
Unchecked exception classthe Disabled checkbox DisabledWarning icon Warning
Unchecked exception declared in throws clausethe Disabled checkbox DisabledWarning icon Warning
Unnecessary call to Throwable.initCause()the Enabled checkbox EnabledWarning icon Warning

Finalization

Inspection nameDefault stateDefault severity
finalize() called explicitlythe Enabled checkbox EnabledWarning icon Warning
finalize() declarationthe Disabled checkbox DisabledWarning icon Warning
finalize() not declared protectedthe Disabled checkbox DisabledWarning icon Warning

General

Inspection nameDefault stateDefault severity
Test-only class or method call in production codethe Disabled checkbox DisabledWarning icon Warning

Imports

Inspection nameDefault stateDefault severity
* importthe Disabled checkbox DisabledWarning icon Warning
Import from same packagethe Disabled checkbox DisabledWarning icon Warning
java.lang importthe Disabled checkbox DisabledWarning icon Warning
Single class importthe Disabled checkbox DisabledWarning icon Warning
Static importthe Disabled checkbox DisabledWarning icon Warning
Unused importthe Enabled checkbox EnabledWarning icon Warning

Inheritance issues

Inspection nameDefault stateDefault severity
Abstract class extends concrete classthe Disabled checkbox DisabledWarning icon Warning
Abstract class which has no concrete subclassthe Disabled checkbox DisabledWarning icon Warning
Abstract class without abstract methodsthe Disabled checkbox DisabledWarning icon Warning
Abstract method overrides abstract methodthe Disabled checkbox DisabledWarning icon Warning
Abstract method overrides concrete methodthe Disabled checkbox DisabledWarning icon Warning
Abstract method with missing implementationsthe Disabled checkbox DisabledWarning icon Warning
Class explicitly extends a Collection classthe Disabled checkbox DisabledWarning icon Warning
Class extends annotation interfacethe Enabled checkbox EnabledWarning icon Warning
Class extends utility classthe Disabled checkbox DisabledWarning icon Warning
Class may extend a commonly used base classthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Final declaration can't be overridden at runtimethe Enabled checkbox EnabledError icon Error
Interface which has no concrete subclassthe Disabled checkbox DisabledWarning icon Warning
Method does not call super methodthe Enabled checkbox EnabledWarning icon Warning
Method is identical to its super methodthe Disabled checkbox DisabledWarning icon Warning
Missing @Override annotationthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Non-varargs method overrides varargs methodthe Disabled checkbox DisabledWarning icon Warning
Parameter type prevents overridingthe Disabled checkbox DisabledWarning icon Warning
public constructor in abstract classthe Disabled checkbox DisabledWarning icon Warning
Static inheritancethe Disabled checkbox DisabledWarning icon Warning
Type parameter extends final classthe Disabled checkbox DisabledWarning icon Warning

Initialization

Inspection nameDefault stateDefault severity
Abstract method called during object constructionthe Disabled checkbox DisabledWarning icon Warning
Double brace initializationthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Instance field may not be initializedthe Disabled checkbox DisabledWarning icon Warning
Instance field used before initializationthe Disabled checkbox DisabledWarning icon Warning
Non-final static field is used during class initializationthe Disabled checkbox DisabledWarning icon Warning
Overridable method called during object constructionthe Disabled checkbox DisabledWarning icon Warning
Overridden method called during object constructionthe Disabled checkbox DisabledWarning icon Warning
Static field may not be initializedthe Disabled checkbox DisabledWarning icon Warning
Static field used before initializationthe Disabled checkbox DisabledWarning icon Warning
this reference escaped in object constructionthe Disabled checkbox DisabledWarning icon Warning
Unsafe lazy initialization of static fieldthe Disabled checkbox DisabledWarning icon Warning

Internationalization

Inspection nameDefault stateDefault severity
Absolute alignment used in AWT/Swing codethe Disabled checkbox DisabledWarning icon Warning
Call to Date.toString()the Disabled checkbox DisabledWarning icon Warning
Call to String.toUpperCase() or codetoLowerCase() without a Localethe Disabled checkbox DisabledWarning icon Warning
Call to Time.toString()the Disabled checkbox DisabledWarning icon Warning
Call to Numeric toString()the Disabled checkbox DisabledWarning icon Warning
Call to suspicious String methodthe Disabled checkbox DisabledWarning icon Warning
Character comparisonthe Disabled checkbox DisabledWarning icon Warning
Duplicate string literalthe Disabled checkbox DisabledWarning icon Warning
Hard coded stringsthe Disabled checkbox DisabledWarning icon Warning
Implicit usage of platformcodes default charsetthe Disabled checkbox DisabledWarning icon Warning
Incorrect string capitalizationthe Enabled checkbox EnabledWarning icon Warning
Instantiating a SimpleDateFormat without a Localethe Disabled checkbox DisabledWarning icon Warning
Magic characterthe Disabled checkbox DisabledWarning icon Warning
String concatenationthe Disabled checkbox DisabledWarning icon Warning
Unnecessary unicode escape sequencethe Disabled checkbox DisabledWarning icon Warning
Use of StringTokenizerthe Disabled checkbox DisabledWarning icon Warning

J2ME issues

Inspection nameDefault stateDefault severity
Abstract class which has only one direct inheritorthe Disabled checkbox DisabledWarning icon Warning
Array.length in loop conditionthe Disabled checkbox DisabledWarning icon Warning
Connection opened but not safely closedthe Disabled checkbox DisabledWarning icon Warning
Interface which has only one direct inheritorthe Disabled checkbox DisabledWarning icon Warning
Large array allocation with no OutOfMemoryError checkthe Disabled checkbox DisabledWarning icon Warning
Method call in loop conditionthe Disabled checkbox DisabledWarning icon Warning
Multiply or divide by power of twothe Disabled checkbox DisabledWarning icon Warning
Overly large initializer for array of primitive typethe Disabled checkbox DisabledWarning icon Warning
RecordStore opened but not safely closedthe Disabled checkbox DisabledWarning icon Warning
Single character startsWith() or codeendsWith()the Disabled checkbox DisabledWarning icon Warning
Synthetic accessor callthe Disabled checkbox DisabledWarning icon Warning

Java language level

Inspection nameDefault stateDefault severity
Annotationthe Disabled checkbox DisabledWarning icon Warning
Annotation classthe Disabled checkbox DisabledWarning icon Warning
assert statementthe Disabled checkbox DisabledWarning icon Warning
Auto-boxingthe Disabled checkbox DisabledWarning icon Warning
Auto-unboxingthe Disabled checkbox DisabledWarning icon Warning
Enumerated classthe Disabled checkbox DisabledWarning icon Warning
Extended for statementthe Disabled checkbox DisabledWarning icon Warning
Use of assert as identifierthe Disabled checkbox DisabledWarning icon Warning
Use of enum as identifierthe Disabled checkbox DisabledWarning icon Warning
Varargs methodthe Enabled checkbox EnabledInfo icon No highlighting, only fix

Java language level migration aids

Inspection nameDefault stateDefault severity
compare() method can be used to compare numbersthe Enabled checkbox EnabledWarning icon Warning
Enumeration can be iterationthe Disabled checkbox DisabledWarning icon Warning
if replaceable with switchthe Enabled checkbox EnabledWarning icon Warning
Usages of API which isn't available at the configured language levelthe Enabled checkbox EnabledError icon Error

Java 5


BigDecimal legacy method calledthe Disabled checkbox DisabledWarning icon Warning
Collections.EMPTY_* field access replaceable with Collections.empty*() method callthe Disabled checkbox DisabledWarning icon Warning
for loop replaceable with enhanced for loopthe Enabled checkbox EnabledWarning icon Warning
String.indexOf() expression is replaceable with contains()the Enabled checkbox EnabledWarning icon Warning
Method can be varargs methodthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Raw use of parameterized classthe Enabled checkbox EnabledWarning icon Warning
StringBuffer may be StringBuilderthe Enabled checkbox EnabledWarning icon Warning
Unnecessary boxingthe Enabled checkbox EnabledWarning icon Warning
Unnecessary unboxingthe Enabled checkbox EnabledWarning icon Warning
while loop replaceable with enhanced for loopthe Enabled checkbox EnabledWarning icon Warning

Java 7


equals() expression replaceable by Objects.equals() expressionthe Enabled checkbox EnabledWeak Warning icon Weak Warning
Explicit type can be replaced with <>the Enabled checkbox EnabledWarning icon Warning
Identical catch branches in try statementthe Enabled checkbox EnabledWarning icon Warning
Possible heap pollution from parameterized vararg typethe Enabled checkbox EnabledWarning icon Warning
try finally replaceable with try with resourcesthe Enabled checkbox EnabledWarning icon Warning

Java 8


Anonymous type can be replaced with lambdathe Enabled checkbox EnabledWarning icon Warning
Anonymous type can be replaced with method referencethe Enabled checkbox EnabledWarning icon Warning
Anonymous type has shorter lambda alternativethe Enabled checkbox EnabledWarning icon Warning
Collections.sort() can be replaced with List.sort()the Enabled checkbox EnabledWarning icon Warning
Comparator combinator can be usedthe Enabled checkbox EnabledWarning icon Warning
Expression can be folded into Stream chainthe Enabled checkbox EnabledInfo icon No highlighting, only fix
forEach call can be simplifiedthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Guava's functional primitives can be replaced by Javathe Enabled checkbox EnabledWarning icon Warning
Lambda can be replaced with method callthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Lambda can be replaced with method referencethe Enabled checkbox EnabledWarning icon Warning
Loop can be collapsed with Stream APIthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Loop can be replaced with Collection.removeIf()the Enabled checkbox EnabledWarning icon Warning
Map.forEach can be usedthe Enabled checkbox EnabledWarning icon Warning
Pseudo functional expression using static classthe Enabled checkbox EnabledWarning icon Warning
Single Map method can be usedthe Enabled checkbox EnabledWarning icon Warning
Statement lambda can be replaced with expression lambdathe Enabled checkbox EnabledWarning icon Warning

Java 9


Dependencies on automatic modulesthe Enabled checkbox EnabledWarning icon Warning
Immutable collection creation can be replaced with collection factory callthe Enabled checkbox EnabledWarning icon Warning
Null check can be replaced with method callthe Enabled checkbox EnabledWarning icon Warning

Java 10


Local variable type can be omittedthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Variable type can be explicitthe Enabled checkbox EnabledInfo icon No highlighting, only fix

Java 11


Files.readString() or Files.writeString() can be usedthe Enabled checkbox EnabledInfo icon No highlighting, only fix
String.repeat() can be usedthe Enabled checkbox EnabledInfo icon No highlighting, only fix

Java 13


New style switch can be replaced with old style onethe Enabled checkbox EnabledInfo icon No highlighting, only fix
Statement can be replaced with enhanced switchthe Enabled checkbox EnabledWarning icon Warning
Text block can be replaced with regular string literalthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Text block can be usedthe Enabled checkbox EnabledWarning icon Warning

JavaBeans issues

Inspection nameDefault stateDefault severity
Class without constructorthe Disabled checkbox DisabledWarning icon Warning
Class without no-arg constructorthe Disabled checkbox DisabledWarning icon Warning
Field has setter but no getterthe Disabled checkbox DisabledWarning icon Warning
Property value set to itselfthe Disabled checkbox DisabledWarning icon Warning
Suspicious getter/setterthe Disabled checkbox DisabledWarning icon Warning

JavaDoc

Inspection nameDefault stateDefault severity
<code>...</code> can be replaced with {@code ...}the Disabled checkbox DisabledWarning icon Warning
Dangling Javadoc commentthe Enabled checkbox EnabledWarning icon Warning
Declaration has Javadoc problemsthe Enabled checkbox EnabledWarning icon Warning
Declaration has problems in Javadoc referencesthe Enabled checkbox EnabledError icon Error
HTML problems in Javadoc (DocLint)the Disabled checkbox DisabledError icon Error
Missing package-info.javathe Disabled checkbox DisabledWarning icon Warning
Missing @Deprecated annotationthe Disabled checkbox DisabledWarning icon Warning
package-info.java without package statementthe Disabled checkbox DisabledWarning icon Warning
package.html may be converted to package-info.javathe Disabled checkbox DisabledWarning icon Warning
Unnecessary Javadoc linkthe Disabled checkbox DisabledWarning icon Warning
Unnecessary {@inheritDoc} Javadoc commentthe Disabled checkbox DisabledWarning icon Warning

JUnit

Inspection nameDefault stateDefault severity
assertEquals() between objects of inconvertible typesthe Enabled checkbox EnabledWarning icon Warning
assertEquals() called on arraythe Disabled checkbox DisabledWarning icon Warning
assertEquals() may be assertSame()the Disabled checkbox DisabledWarning icon Warning
Assertion expression can be replaced with assertThat method callthe Disabled checkbox DisabledWarning icon Warning
Constant JUnit assert argumentthe Disabled checkbox DisabledWarning icon Warning
Expected exception never thrown in test method bodythe Disabled checkbox DisabledWarning icon Warning
Highlight problem line in testthe Enabled checkbox EnabledWarning icon Warning
JUnit test annotated with @Ignore/ @Disabledthe Disabled checkbox DisabledWarning icon Warning
JUnit test method in product sourcethe Disabled checkbox DisabledWarning icon Warning
JUnit test method without any assertionsthe Disabled checkbox DisabledWarning icon Warning
JUnit TestCase in product sourcethe Disabled checkbox DisabledWarning icon Warning
JUnit TestCase with non-trivial constructorsthe Disabled checkbox DisabledWarning icon Warning
JUnit 4 test can be JUnit 5the Disabled checkbox DisabledWarning icon Warning
JUnit 4 test method in class extending JUnit 3 TestCasethe Enabled checkbox EnabledWarning icon Warning
JUnit 5 malformed @Nested classthe Enabled checkbox EnabledWarning icon Warning
JUnit 5 malformed parameterized testthe Enabled checkbox EnabledWarning icon Warning
JUnit 5 malformed repeated testthe Enabled checkbox EnabledWarning icon Warning
Malformed setUp() or tearDown() methodthe Disabled checkbox DisabledWarning icon Warning
Malformed @Before or @After methodthe Enabled checkbox EnabledWarning icon Warning
Malformed @BeforeClass/@BeforeAll or @AfterClass/@AfterAll methodthe Enabled checkbox EnabledWarning icon Warning
Malformed @DataPoint fieldthe Disabled checkbox DisabledWarning icon Warning
Malformed @Rule/@ClassRule fieldthe Disabled checkbox DisabledWarning icon Warning
Malformed test methodthe Enabled checkbox EnabledWarning icon Warning
Message missing on JUnit assertionthe Disabled checkbox DisabledWarning icon Warning
Misordered assertEquals() argumentsthe Disabled checkbox DisabledWarning icon Warning
Multiple exceptions declared on test methodthe Disabled checkbox DisabledWarning icon Warning
Obsolete assertions in JUnit 5 teststhe Disabled checkbox DisabledWarning icon Warning
Old style JUnit test method in JUnit 4 classthe Disabled checkbox DisabledWarning icon Warning
@RunWith(JUnitPlatform.class) without test methodsthe Enabled checkbox EnabledWarning icon Warning
@RunWith(Parameterized.class) without data providerthe Disabled checkbox DisabledWarning icon Warning
Simplifiable JUnit assertionthe Enabled checkbox EnabledWarning icon Warning
suite() method not declared staticthe Enabled checkbox EnabledWarning icon Warning
super.tearDown() not called from finally blockthe Disabled checkbox DisabledWarning icon Warning
Test class with no teststhe Disabled checkbox DisabledWarning icon Warning
Unconstructable JUnit TestCasethe Enabled checkbox EnabledWarning icon Warning
Usage of obsolete junit.framework.Assert methodthe Disabled checkbox DisabledWarning icon Warning

Logging

Inspection nameDefault stateDefault severity
Class with multiple loggersthe Disabled checkbox DisabledWarning icon Warning
Class without loggerthe Disabled checkbox DisabledWarning icon Warning
Log condition does not match logging callthe Disabled checkbox DisabledWarning icon Warning
Logger initialized with foreign classthe Disabled checkbox DisabledWarning icon Warning
Logging call not guarded by log conditionthe Disabled checkbox DisabledWarning icon Warning
Non-constant loggerthe Disabled checkbox DisabledWarning icon Warning
Non-constant string concatenation as argument to logging callthe Disabled checkbox DisabledWarning icon Warning
Number of placeholders does not match number of arguments in logging callthe Enabled checkbox EnabledWarning icon Warning
public method without loggingthe Disabled checkbox DisabledWarning icon Warning

Memory

Inspection nameDefault stateDefault severity
Anonymous class may be a named static inner classthe Disabled checkbox DisabledWarning icon Warning
Calls to System.gc() or Runtime.gc()the Disabled checkbox DisabledWarning icon Warning
Inner class may be staticthe Enabled checkbox EnabledWarning icon Warning
Return of instance of anonymous, local or inner classthe Disabled checkbox DisabledWarning icon Warning
Static collectionthe Disabled checkbox DisabledWarning icon Warning
StringBuilder fieldthe Disabled checkbox DisabledWarning icon Warning
Unnecessary zero length array usagethe Enabled checkbox EnabledWarning icon Warning
Zero-length array allocationthe Disabled checkbox DisabledWarning icon Warning

Method metrics

Inspection nameDefault stateDefault severity
Constructor with too many parametersthe Disabled checkbox DisabledWarning icon Warning
Method with more than three negationsthe Disabled checkbox DisabledWarning icon Warning
Method with multiple loopsthe Disabled checkbox DisabledWarning icon Warning
Method with multiple return pointsthe Disabled checkbox DisabledWarning icon Warning
Method with too many exceptions declaredthe Disabled checkbox DisabledWarning icon Warning
Method with too many parametersthe Disabled checkbox DisabledWarning icon Warning
Overly complex methodthe Disabled checkbox DisabledWarning icon Warning
Overly coupled methodthe Disabled checkbox DisabledWarning icon Warning
Overly long lambda expressionthe Disabled checkbox DisabledWarning icon Warning
Overly long methodthe Disabled checkbox DisabledWarning icon Warning
Overly nested methodthe Disabled checkbox DisabledWarning icon Warning

Modularization issues

Inspection nameDefault stateDefault severity
Class independent of its module the Inspect Code iconthe Disabled checkbox DisabledWarning icon Warning
Class only used from one other module the Inspect Code iconthe Disabled checkbox DisabledWarning icon Warning
Inconsistent language level settings the Inspect Code iconthe Disabled checkbox DisabledWarning icon Warning
Module with too few classes the Inspect Code iconthe Disabled checkbox DisabledWarning icon Warning
Module with too many classes the Inspect Code iconthe Disabled checkbox DisabledWarning icon Warning

Inspections labeled with the Inspect Code icon are not available in the editor and can be launched via Analyze | Inspect Code or Analyze | Run Inspection By Name.

Naming conventions

Inspection nameDefault stateDefault severity
Boolean method name must start with question wordthe Disabled checkbox DisabledWarning icon Warning
Class name prefixed with package namethe Disabled checkbox DisabledWarning icon Warning
Class name same as ancestor namethe Disabled checkbox DisabledWarning icon Warning
Class naming conventionthe Disabled checkbox DisabledWarning icon Warning
Confusing main() methodthe Disabled checkbox DisabledWarning icon Warning
Exception class name does not end with Exceptionthe Disabled checkbox DisabledWarning icon Warning
Field naming conventionthe Disabled checkbox DisabledWarning icon Warning
Java module naming conventionsthe Enabled checkbox EnabledWarning icon Warning
Lambda parameter naming conventionthe Disabled checkbox DisabledWarning icon Warning
Lambda-unfriendly method overloadthe Disabled checkbox DisabledWarning icon Warning
Local variable naming conventionthe Disabled checkbox DisabledWarning icon Warning
Method name same as class namethe Enabled checkbox EnabledWarning icon Warning
Method name same as parent class namethe Disabled checkbox DisabledWarning icon Warning
Method names differing only by casethe Disabled checkbox DisabledWarning icon Warning
Method naming conventionthe Disabled checkbox DisabledWarning icon Warning
Method parameter naming conventionthe Disabled checkbox DisabledWarning icon Warning
Non-boolean method name must not start with question wordthe Disabled checkbox DisabledWarning icon Warning
Non-constant field with upper-case namethe Disabled checkbox DisabledWarning icon Warning
Non-exception class name ends with Exceptionthe Disabled checkbox DisabledWarning icon Warning
Overloaded methods with same number of parametersthe Disabled checkbox DisabledWarning icon Warning
Overloaded varargs methodthe Disabled checkbox DisabledWarning icon Warning
Package naming conventionthe Disabled checkbox DisabledWarning icon Warning
Parameter name differs from parameter in overridden methodthe Disabled checkbox DisabledWarning icon Warning
Questionable namethe Disabled checkbox DisabledWarning icon Warning
Standard variable namesthe Disabled checkbox DisabledWarning icon Warning
Use of $ in identifierthe Disabled checkbox DisabledWarning icon Warning

Numeric issues

Inspection nameDefault stateDefault severity
Call to BigDecimal method without a rounding mode argumentthe Enabled checkbox EnabledWarning icon Warning
char expression used in arithmetic contextthe Disabled checkbox DisabledWarning icon Warning
Comparison of short and char valuesthe Disabled checkbox DisabledWarning icon Warning
Comparison to Double.NaN or Float.NaNthe Enabled checkbox EnabledWarning icon Warning
Confusing floating-point literalthe Disabled checkbox DisabledWarning icon Warning
Constant call to java.lang.Maththe Disabled checkbox DisabledWarning icon Warning
Divide by zerothe Enabled checkbox EnabledWarning icon Warning
double literal cast to float could be float literalthe Disabled checkbox DisabledWarning icon Warning
equals() called on java.math.BigDecimalthe Disabled checkbox DisabledWarning icon Warning
Floating point equality comparisonthe Disabled checkbox DisabledWarning icon Warning
Implicit numeric conversionthe Disabled checkbox DisabledWarning icon Warning
int literal cast to long could be long literalthe Disabled checkbox DisabledWarning icon Warning
Integer division in floating point contextthe Enabled checkbox EnabledWarning icon Warning
Integer multiplication or shift implicitly cast to longthe Disabled checkbox DisabledWarning icon Warning
long literal ending with l instead of Lthe Enabled checkbox EnabledWarning icon Warning
Non-reproducible call to java.lang.Maththe Disabled checkbox DisabledWarning icon Warning
Number constructor call with primitive argumentthe Enabled checkbox EnabledWarning icon Warning
Numeric cast that loses precisionthe Disabled checkbox DisabledWarning icon Warning
Numeric overflowthe Enabled checkbox EnabledWarning icon Warning
Octal and decimal integers in same arraythe Disabled checkbox DisabledWarning icon Warning
Octal integerthe Enabled checkbox EnabledWarning icon Warning
Overly complex arithmetic expressionthe Disabled checkbox DisabledWarning icon Warning
Pointless arithmetic expressionthe Enabled checkbox EnabledWarning icon Warning
Suspicious test for oddnessthe Disabled checkbox DisabledWarning icon Warning
Suspicious underscore in number literalthe Disabled checkbox DisabledWarning icon Warning
Unary plusthe Disabled checkbox DisabledWarning icon Warning
Unnecessary explicit numeric castthe Disabled checkbox DisabledWarning icon Warning
Unnecessary unary minusthe Disabled checkbox DisabledWarning icon Warning
Unpredictable BigDecimal constructor callthe Enabled checkbox EnabledWarning icon Warning

Packaging issues

Inspection nameDefault stateDefault severity
Class independent of its package the Inspect Code iconthe Disabled checkbox DisabledWarning icon Warning
Class only used from one other package the Inspect Code iconthe Disabled checkbox DisabledWarning icon Warning
Empty directory the Inspect Code iconthe Disabled checkbox DisabledWarning icon Warning
Exception package the Inspect Code iconthe Disabled checkbox DisabledWarning icon Warning
Package with classes in multiple modules the Inspect Code iconthe Disabled checkbox DisabledWarning icon Warning
Package with disjoint dependency graph the Inspect Code iconthe Disabled checkbox DisabledWarning icon Warning
Package with too few classes the Inspect Code iconthe Disabled checkbox DisabledWarning icon Warning
Package with too many classes the Inspect Code iconthe Disabled checkbox DisabledWarning icon Warning

Inspections labeled with the Inspect Code icon are not available in the editor and can be launched via Analyze | Inspect Code or Analyze | Run Inspection By Name.

Performance

Inspection nameDefault stateDefault severity
Boolean constructor callthe Enabled checkbox EnabledWarning icon Warning
Boxing of already boxed valuethe Enabled checkbox EnabledWarning icon Warning
Bulk operation can be used instead of iterationthe Enabled checkbox EnabledWarning icon Warning
Call to Arrays.asList() with too few argumentsthe Enabled checkbox EnabledWarning icon Warning
Call to simple getter from within classthe Disabled checkbox DisabledWarning icon Warning
Call to simple setter from within classthe Disabled checkbox DisabledWarning icon Warning
Class initializer may be staticthe Enabled checkbox EnabledWarning icon Warning
Collection.toArray() call stylethe Enabled checkbox EnabledWarning icon Warning
Collection without initial capacitythe Disabled checkbox DisabledWarning icon Warning
Concatenation with empty stringthe Disabled checkbox DisabledWarning icon Warning
Dynamic regular expression could be replaced by compiled Patternthe Disabled checkbox DisabledWarning icon Warning
equals() call can be replaced with ==the Enabled checkbox EnabledInfo icon No highlighting, only fix
equals() or hashCode() called on java.net.URL objectthe Disabled checkbox DisabledWarning icon Warning
Explicit argument can be lambdathe Enabled checkbox EnabledInfo icon No highlighting, only fix
Field may be staticthe Disabled checkbox DisabledWarning icon Warning
Inefficient Stream API call chains ending with count()the Enabled checkbox EnabledWarning icon Warning
Instantiating object to get Class objectthe Enabled checkbox EnabledWarning icon Warning
Iteration over keySet() may be optimizedthe Disabled checkbox DisabledWarning icon Warning
List.remove() called in loopthe Enabled checkbox EnabledWarning icon Warning
Loop can be terminated after condition is metthe Enabled checkbox EnabledWarning icon Warning
Manual array copythe Enabled checkbox EnabledWarning icon Warning
Manual array to collection copythe Enabled checkbox EnabledWarning icon Warning
Map or Set may contain java.net.URL objectsthe Disabled checkbox DisabledWarning icon Warning
Map replaceable with EnumMapthe Disabled checkbox DisabledWarning icon Warning
Method may be staticthe Disabled checkbox DisabledWarning icon Warning
Non-constant String should be StringBuilderthe Disabled checkbox DisabledWarning icon Warning
Object allocation in loopthe Disabled checkbox DisabledWarning icon Warning
Object instantiation inside equals() or hashCode()the Disabled checkbox DisabledWarning icon Warning
Redundant Collection.addAll() callthe Enabled checkbox EnabledWarning icon Warning
Redundant call to String.format()the Enabled checkbox EnabledWarning icon Warning
Set replaceable with EnumSetthe Disabled checkbox DisabledWarning icon Warning
Single character string argument in String.indexOf() callthe Disabled checkbox DisabledWarning icon Warning
Single character string concatenationthe Enabled checkbox EnabledInfo icon No highlighting, only fix
String.equals("")the Disabled checkbox DisabledWarning icon Warning
String concatenation as argument to StringBuilder.append() callthe Enabled checkbox EnabledWarning icon Warning
String concatenation in loopthe Enabled checkbox EnabledWarning icon Warning
StringBuilder.toString() in concatenationthe Disabled checkbox DisabledWarning icon Warning
StringBuilder without initial capacitythe Disabled checkbox DisabledWarning icon Warning
Tail recursionthe Enabled checkbox EnabledInfo icon No highlighting, only fix
Unnecessary temporary object in conversion from Stringthe Enabled checkbox EnabledWarning icon Warning
Unnecessary temporary object in conversion to Stringthe Enabled checkbox EnabledWarning icon Warning
Using Random.nextDouble() to get random integerthe Disabled checkbox DisabledWarning icon Warning

Portability

Inspection nameDefault stateDefault severity
Call to Runtime.exec()the Disabled checkbox DisabledWarning icon Warning
Call to System.exit() or related methodsthe Disabled checkbox DisabledWarning icon Warning
Call to System.getenv()the Disabled checkbox DisabledWarning icon Warning
Hardcoded file separatorthe Disabled checkbox DisabledWarning icon Warning
Hardcoded line separatorthe Disabled checkbox DisabledWarning icon Warning
Native methodthe Disabled checkbox DisabledWarning icon Warning
Use of java.lang.ProcessBuilder classthe Disabled checkbox DisabledWarning icon Warning
Use of AWT peer classthe Disabled checkbox DisabledWarning icon Warning
Use of concrete JDBC driver classthe Disabled checkbox DisabledWarning icon Warning
Use of sun.* classesthe Disabled checkbox DisabledWarning icon Warning

Probable bugs

Nullability problems

Inspection nameDefault stateDefault severity
@NotNull field is not initializedthe Enabled checkbox EnabledWarning icon Warning
@NotNull/@Nullable problemsthe Enabled checkbox EnabledWarning icon Warning
Return of nullthe Disabled checkbox DisabledWarning icon Warning
Inspection nameDefault stateDefault severity
Array comparison using ==, instead of Arrays.equals()the Disabled checkbox DisabledWarning icon Warning
assert statement condition is constantthe Disabled checkbox DisabledWarning icon Warning
assert statement with side effectsthe Enabled checkbox EnabledWarning icon Warning
Call to toString() on arraythe Enabled checkbox EnabledWarning icon Warning
Call to String.replaceAll(".", ...)the Enabled checkbox EnabledWarning icon Warning
Call to default toString()the Disabled checkbox DisabledWarning icon Warning
Cast conflicts with instanceofthe Disabled checkbox DisabledWarning icon Warning
Casting to incompatible interfacethe Disabled checkbox DisabledWarning icon Warning
Class.getClass() callthe Enabled checkbox EnabledWarning icon Warning
Cleaner captures object referencethe Enabled checkbox EnabledWarning icon Warning
Collection added to selfthe Enabled checkbox EnabledWarning icon Warning
Comparable implemented but equals() not overriddenthe Disabled checkbox DisabledWarning icon Warning
Confusing argument to varargs methodthe Enabled checkbox EnabledWarning icon Warning
Confusing primitive array argument to varargs methodthe Enabled checkbox EnabledWarning icon Warning
Constant conditions & exceptionsthe Enabled checkbox EnabledWarning icon Warning
Contract issuesthe Enabled checkbox EnabledWarning icon Warning
Copy constructor misses fieldthe Enabled checkbox EnabledWarning icon Warning
Covariant equals()the Disabled checkbox DisabledWarning icon Warning
Duplicated delimiters in java.util.StringTokenizerthe Enabled checkbox EnabledWarning icon Warning
Empty class initializerthe Disabled checkbox DisabledWarning icon Warning
equal() instead of equals()the Disabled checkbox DisabledWarning icon Warning
equals() and hashCode() not pairedthe Disabled checkbox DisabledWarning icon Warning
equals() between objects of inconvertible typesthe Enabled checkbox EnabledWarning icon Warning
equals() called on StringBuilderthe Enabled checkbox EnabledWarning icon Warning
equals() called on arraythe Enabled checkbox EnabledWarning icon Warning
equals() called on itselfthe Enabled checkbox EnabledWarning icon Warning
equals() method which does not check class of parameterthe Enabled checkbox EnabledWarning icon Warning
hashCode() called on arraythe Enabled checkbox EnabledWarning icon Warning
Infinite recursionthe Enabled checkbox EnabledWarning icon Warning
Inner class referenced via subclassthe Disabled checkbox DisabledWarning icon Warning
instanceof with incompatible interfacethe Disabled checkbox DisabledWarning icon Warning
Instantiation of utility classthe Disabled checkbox DisabledWarning icon Warning
Invalid method reference used for Comparatorthe Enabled checkbox EnabledWarning icon Warning
Iterable is used as varargthe Enabled checkbox EnabledWarning icon Warning
Iterator.hasNext() which calls next()the Disabled checkbox DisabledWarning icon Warning
Iterator.next() which can't throw NoSuchElementExceptionthe Disabled checkbox DisabledWarning icon Warning
Loop executes zero or billions timesthe Enabled checkbox EnabledWarning icon Warning
Magic Constantthe Enabled checkbox EnabledWarning icon Warning
Malformed format stringthe Enabled checkbox EnabledWarning icon Warning
Malformed regular expressionthe Disabled checkbox DisabledWarning icon Warning
Malformed XPath expressionthe Enabled checkbox EnabledWarning icon Warning
Math.random() cast to intthe Enabled checkbox EnabledWarning icon Warning
Mismatched case in String operationthe Enabled checkbox EnabledWarning icon Warning
Mismatched query and update of StringBuilderthe Enabled checkbox EnabledWarning icon Warning
Mismatched query and update of collectionthe Enabled checkbox EnabledWarning icon Warning
Mismatched read and write of arraythe Enabled checkbox EnabledWarning icon Warning
New object is compared using ==the Enabled checkbox EnabledWarning icon Warning
Non-final field referenced in compareTo()the Disabled checkbox DisabledWarning icon Warning
Non-final field referenced in equals()the Disabled checkbox DisabledWarning icon Warning
Non-final field referenced in hashCode()the Disabled checkbox DisabledWarning icon Warning
Non-short-circuit boolean expressionthe Disabled checkbox DisabledWarning icon Warning
Non-short-circuit operation consumes the infinite streamthe Enabled checkbox EnabledWarning icon Warning
Number comparison using ==, instead of equals()the Enabled checkbox EnabledWarning icon Warning
Object comparison using ==, instead of equals()the Enabled checkbox EnabledInfo icon No highlighting, only fix
Objects.equals() called on arraysthe Enabled checkbox EnabledWarning icon Warning
Optional.get() is called without isPresent() checkthe Enabled checkbox EnabledWarning icon Warning
Overwritten Map key or Set elementthe Enabled checkbox EnabledWarning icon Warning
Reference checked for null is not used inside ifthe Disabled checkbox DisabledWarning icon Warning
Reflective access to a source-only annotationthe Enabled checkbox EnabledWarning icon Warning
Result of method call ignoredthe Enabled checkbox EnabledWarning icon Warning
Result of object allocation ignoredthe Disabled checkbox DisabledWarning icon Warning
Sorted collection with non-comparable elementsthe Enabled checkbox EnabledWarning icon Warning
Statement with empty bodythe Enabled checkbox EnabledWarning icon Warning
Static field referenced via subclassthe Disabled checkbox DisabledWarning icon Warning
Static method referenced via subclassthe Disabled checkbox DisabledWarning icon Warning
String.equals() called with CharSequence argumentthe Enabled checkbox EnabledWarning icon Warning
String comparison using ==, instead of equals()the Enabled checkbox EnabledWarning icon Warning
String concatenation as argument to MessageFormat.format() callthe Disabled checkbox DisabledWarning icon Warning
String concatenation as argument to format() callthe Disabled checkbox DisabledWarning icon Warning
String literal concatenation missing whitespacethe Disabled checkbox DisabledWarning icon Warning
StringBuilder constructor call with char argumentthe Enabled checkbox EnabledWarning icon Warning
Subtraction in compareTo()the Disabled checkbox DisabledWarning icon Warning
Suspicious Collection.toArray() callthe Enabled checkbox EnabledWarning icon Warning
Suspicious Comparator.compare() implementationthe Enabled checkbox EnabledWarning icon Warning
Suspicious List.remove() in the loopthe Enabled checkbox EnabledWarning icon Warning
Suspicious System.arraycopy() callthe Enabled checkbox EnabledWarning icon Warning
Suspicious Arrays method callsthe Enabled checkbox EnabledWarning icon Warning
Suspicious array castthe Disabled checkbox DisabledWarning icon Warning
Suspicious collections method callsthe Enabled checkbox EnabledWarning icon Warning
Suspicious indentation after control statement without bracesthe Disabled checkbox DisabledWarning icon Warning
Suspicious integer division assignmentthe Enabled checkbox EnabledWarning icon Warning
Suspicious usage of compare methodthe Enabled checkbox EnabledWarning icon Warning
Suspicious variable/parameter name combinationthe Enabled checkbox EnabledWarning icon Warning
Text label in switch statementthe Enabled checkbox EnabledWarning icon Warning
Throwable not thrownthe Enabled checkbox EnabledWarning icon Warning
Unsafe call to Class.newInstance()the Disabled checkbox DisabledWarning icon Warning
Unused assignmentthe Enabled checkbox EnabledWarning icon Warning
Use of Properties object as a Hashtablethe Disabled checkbox DisabledWarning icon Warning
Use of index 0 in JDBC ResultSetthe Disabled checkbox DisabledWarning icon Warning
Wrong package statementthe Enabled checkbox EnabledError icon Error

Properties Files

Inspection nameDefault stateDefault severity
Invalid property keythe Enabled checkbox EnabledError icon Error

Reflective access

Inspection nameDefault stateDefault severity
MethodHandle/VarHandle type mismatchthe Enabled checkbox EnabledWarning icon Warning
Non-runtime annotation to be used by reflectionthe Enabled checkbox EnabledWarning icon Warning
Reflective access across modules issuesthe Enabled checkbox EnabledWarning icon Warning
Reflective access to nonexistent/not visible class memberthe Enabled checkbox EnabledWarning icon Warning
Reflective invocation arguments mismatchthe Enabled checkbox EnabledWarning icon Warning

Resource management

Inspection nameDefault stateDefault severity
Channel opened but not safely closedthe Disabled checkbox DisabledWarning icon Warning
Hibernate resource opened but not safely closedthe Disabled checkbox DisabledWarning icon Warning
I/O resource opened but not safely closedthe Disabled checkbox DisabledWarning icon Warning
JDBC resource opened but not safely closedthe Disabled checkbox DisabledWarning icon Warning
JNDI resource opened but not safely closedthe Disabled checkbox DisabledWarning icon Warning
Socket opened but not safely closedthe Disabled checkbox DisabledWarning icon Warning
Use of DriverManager to get JDBC connectionthe Disabled checkbox DisabledWarning icon Warning

Security

Inspection nameDefault stateDefault severity
Access of system propertiesthe Disabled checkbox DisabledWarning icon Warning
Call to Connection.prepare*() with non-constant stringthe Disabled checkbox DisabledWarning icon Warning
Call to Runtime.exec() with non-constant stringthe Disabled checkbox DisabledWarning icon Warning
Call to Statement.execute() with non-constant stringthe Disabled checkbox DisabledWarning icon Warning
Call to System.loadLibrary() with non-constant stringthe Disabled checkbox DisabledWarning icon Warning
Call to System.setSecurityManager()the Disabled checkbox DisabledWarning icon Warning
ClassLoader instantiationthe Disabled checkbox DisabledWarning icon Warning
Cloneable class in secure contextthe Disabled checkbox DisabledWarning icon Warning
Custom ClassLoaderthe Disabled checkbox DisabledWarning icon Warning
Custom SecurityManagerthe Disabled checkbox DisabledWarning icon Warning
Design for extensionthe Disabled checkbox DisabledWarning icon Warning
Insecure random number generationthe Disabled checkbox DisabledWarning icon Warning
Non- static inner class in secure contextthe Disabled checkbox DisabledWarning icon Warning
Non-final clone() in secure contextthe Disabled checkbox DisabledWarning icon Warning
public static array fieldthe Disabled checkbox DisabledWarning icon Warning
public static collection fieldthe Disabled checkbox DisabledWarning icon Warning
Serializable class in secure contextthe Disabled checkbox DisabledWarning icon Warning

Serialization issues

Inspection nameDefault stateDefault severity
Comparator class not declared Serializablethe Disabled checkbox DisabledWarning icon Warning
Externalizable class with readObject() or writeObject()the Disabled checkbox DisabledWarning icon Warning
Externalizable class without public no-arg constructorthe Enabled checkbox EnabledWarning icon Warning
Instance field may not be initialized by readObject()the Disabled checkbox DisabledWarning icon Warning
Non-serializable class with readObject() or writeObject()the Disabled checkbox DisabledWarning icon Warning
Non-serializable class with serialVersionUIDthe Disabled checkbox DisabledWarning icon Warning
Non-serializable field in a Serializable classthe Disabled checkbox DisabledWarning icon Warning
Non-serializable object bound to HttpSessionthe Disabled checkbox DisabledWarning icon Warning
Non-serializable object passed to ObjectOutputStreamthe Disabled checkbox DisabledWarning icon Warning
readObject() or writeObject() not declared privatethe Disabled checkbox DisabledWarning icon Warning
readResolve() or writeReplace() not declared protectedthe Disabled checkbox DisabledWarning icon Warning
Serializable class with unconstructable ancestorthe Disabled checkbox DisabledWarning icon Warning
Serializable class without readObject() and writeObject()the Disabled checkbox DisabledWarning icon Warning
Serializable class without serialVersionUIDthe Disabled checkbox DisabledWarning icon Warning
Serializable non- static inner class with non-Serializable outer classthe Disabled checkbox DisabledWarning icon Warning
Serializable non- static inner class without serialVersionUIDthe Disabled checkbox DisabledWarning icon Warning
Serializable object implicitly stores non-Serializable objectthe Disabled checkbox DisabledWarning icon Warning
serialPersistentFields field not declared private static final ObjectStreamField[]the Disabled checkbox DisabledWarning icon Warning
serialVersionUID field not declared private static final longthe Disabled checkbox DisabledWarning icon Warning
Transient field in non-serializable classthe Disabled checkbox DisabledWarning icon Warning
Transient field is not initialized on deserializationthe Disabled checkbox DisabledWarning icon Warning

TestNG

Inspection nameDefault stateDefault severity
assertEquals() between objects of inconvertible typesthe Enabled checkbox EnabledWarning icon Warning
Constant TestNG assert argumentthe Disabled checkbox DisabledWarning icon Warning
Data provider problemsthe Enabled checkbox EnabledWarning icon Warning
dependsOnMethods problemthe Enabled checkbox EnabledWarning icon Warning
Duplicated data provider namesthe Enabled checkbox EnabledError icon Error
Expected exception never thrown in test method bodythe Disabled checkbox DisabledWarning icon Warning
Groups problemthe Enabled checkbox EnabledWarning icon Warning
Invalid data provider return typethe Enabled checkbox EnabledError icon Error
JUnit Test can be converted to TestNGthe Disabled checkbox DisabledWarning icon Warning
Message missing on TestNG assertionthe Disabled checkbox DisabledWarning icon Warning
Misordered assertEquals() argumentsthe Disabled checkbox DisabledWarning icon Warning
Old TestNG annotation @Configuration is usedthe Disabled checkbox DisabledWarning icon Warning
Simplifiable TestNG assertionthe Enabled checkbox EnabledWarning icon Warning
TestNG Javadoc can be converted to annotationsthe Disabled checkbox DisabledWarning icon Warning
Undeclared testthe Disabled checkbox DisabledWarning icon Warning

Threading issues

Inspection nameDefault stateDefault severity
Access to static field locked on instance datathe Disabled checkbox DisabledWarning icon Warning
AtomicFieldUpdater field not declared static finalthe Enabled checkbox EnabledWarning icon Warning
AtomicFieldUpdater issuesthe Enabled checkbox EnabledWarning icon Warning
await() not in loopthe Disabled checkbox DisabledWarning icon Warning
await() without corresponding signal()the Disabled checkbox DisabledWarning icon Warning
Busy waitthe Disabled checkbox DisabledWarning icon Warning
Call to System.runFinalizersOnExit()the Disabled checkbox DisabledWarning icon Warning
Call to Thread.run()the Enabled checkbox EnabledWarning icon Warning
Call to Thread.setPriority()the Disabled checkbox DisabledWarning icon Warning
Call to Thread.sleep() while synchronizedthe Disabled checkbox DisabledWarning icon Warning
Call to Thread.start() during object constructionthe Disabled checkbox DisabledWarning icon Warning
Call to Thread.stop(), suspend() or resume()the Disabled checkbox DisabledWarning icon Warning
Call to Thread.yield()the Disabled checkbox DisabledWarning icon Warning
Call to notify() instead of notifyAll()the Disabled checkbox DisabledWarning icon Warning
Call to signal() instead of signalAll()the Disabled checkbox DisabledWarning icon Warning
Call to a native method while lockedthe Disabled checkbox DisabledWarning icon Warning
Class directly extends java.lang.Threadthe Disabled checkbox DisabledWarning icon Warning
Double-checked lockingthe Disabled checkbox DisabledWarning icon Warning
Empty synchronized statementthe Disabled checkbox DisabledWarning icon Warning
Field accessed in both synchronized and unsynchronized contextsthe Disabled checkbox DisabledWarning icon Warning
Instantiating a Thread with default run() methodthe Disabled checkbox DisabledWarning icon Warning
Lock acquired but not safely unlockedthe Disabled checkbox DisabledWarning icon Warning
Method with synchronized block could be synchronized methodthe Disabled checkbox DisabledWarning icon Warning
Nested synchronized statementthe Disabled checkbox DisabledWarning icon Warning
Non-atomic operation on volatile fieldthe Enabled checkbox EnabledWarning icon Warning
Non-private field accessed in synchronized contextthe Disabled checkbox DisabledWarning icon Warning
Non thread-safe static field accessthe Disabled checkbox DisabledWarning icon Warning
notify() or notifyAll() called on java.util.concurrent.locks.Condition objectthe Disabled checkbox DisabledWarning icon Warning
notify() or notifyAll() without corresponding state changethe Disabled checkbox DisabledWarning icon Warning
notify() without corresponding wait()the Disabled checkbox DisabledWarning icon Warning
signal() without corresponding await()the Disabled checkbox DisabledWarning icon Warning
Static initializer references subclassthe Enabled checkbox EnabledWarning icon Warning
Synchronization on getClass()the Enabled checkbox EnabledWarning icon Warning
Synchronization on static fieldthe Disabled checkbox DisabledWarning icon Warning
Synchronization on thisthe Disabled checkbox DisabledWarning icon Warning
Synchronization on a Lock objectthe Disabled checkbox DisabledWarning icon Warning
Synchronization on a non-final fieldthe Enabled checkbox EnabledWarning icon Warning
Synchronization on an object initialized with a literalthe Disabled checkbox DisabledWarning icon Warning
Synchronization on local variable or method parameterthe Enabled checkbox EnabledWarning icon Warning
synchronized methodthe Disabled checkbox DisabledWarning icon Warning
ThreadLocal field not declared static finalthe Disabled checkbox DisabledWarning icon Warning
ThreadLocalRandom instance might be sharedthe Disabled checkbox DisabledWarning icon Warning
Unconditional wait() callthe Disabled checkbox DisabledWarning icon Warning
Unsynchronized method overrides synchronized methodthe Disabled checkbox DisabledWarning icon Warning
Volatile array fieldthe Disabled checkbox DisabledWarning icon Warning
wait() called on java.util.concurrent.locks.Condition objectthe Disabled checkbox DisabledWarning icon Warning
wait() not in loopthe Disabled checkbox DisabledWarning icon Warning
wait() or await() without timeoutthe Disabled checkbox DisabledWarning icon Warning
wait() or notify() while not synchronizedthe Disabled checkbox DisabledWarning icon Warning
wait() while holding two locksthe Disabled checkbox DisabledWarning icon Warning
wait() without corresponding notify()the Disabled checkbox DisabledWarning icon Warning
while loop spins on fieldthe Enabled checkbox EnabledWarning icon Warning

toString() issues

Inspection nameDefault stateDefault severity
Class does not override toString() methodthe Disabled checkbox DisabledWarning icon Warning
Field not used in toString() methodthe Disabled checkbox DisabledWarning icon Warning

Verbose or redundant code constructs

Inspection nameDefault stateDefault severity
Comparator can be simplifiedthe Enabled checkbox EnabledWarning icon Warning
Condition is covered by further conditionthe Enabled checkbox EnabledWarning icon Warning
Duplicate branches in switchthe Enabled checkbox EnabledWeak Warning icon Weak Warning
Excessive lambda usagethe Enabled checkbox EnabledWarning icon Warning
Excessive range checkthe Enabled checkbox EnabledWarning icon Warning
Explicit array fillingthe Enabled checkbox EnabledWarning icon Warning
Manual min/max calculationthe Enabled checkbox EnabledWarning icon Warning
Multiple occurrences of the same expressionthe Enabled checkbox EnabledWeak Warning icon Weak Warning
Redundant compare method callthe Enabled checkbox EnabledWarning icon Warning
Redundant isInstance or cast callthe Enabled checkbox EnabledWarning icon Warning
Redundant Collection operationthe Enabled checkbox EnabledWarning icon Warning
Redundant String operationthe Enabled checkbox EnabledWarning icon Warning
Redundant array creationthe Enabled checkbox EnabledWarning icon Warning
Redundant type argumentsthe Enabled checkbox EnabledWarning icon Warning
Redundant type castthe Enabled checkbox EnabledWarning icon Warning
StringBuilder can be replaced with Stringthe Enabled checkbox EnabledWarning icon Warning
Too weak variable type leads to unnecessary castthe Enabled checkbox EnabledWarning icon Warning
Unnecessary break statementthe Enabled checkbox EnabledWarning icon Warning
Unnecessary continue statementthe Enabled checkbox EnabledWarning icon Warning
Unnecessary default for enum switch statementthe Enabled checkbox EnabledWarning icon Warning
Unnecessarily escaped characterthe Enabled checkbox EnabledWarning icon Warning
Unnecessary return statementthe Enabled checkbox EnabledWarning icon Warning
Unnecessary label on break statementthe Enabled checkbox EnabledWarning icon Warning
Unnecessary label on continue statementthe Enabled checkbox EnabledWarning icon Warning

Visibility

Inspection nameDefault stateDefault severity
Access of inherited field looks like access of element in surrounding codethe Disabled checkbox DisabledWarning icon Warning
Anonymous class variable hides variable in containing methodthe Disabled checkbox DisabledWarning icon Warning
Call to inherited method looks like call to local methodthe Disabled checkbox DisabledWarning icon Warning
Field name hides field in superclassthe Disabled checkbox DisabledWarning icon Warning
Inner class field hides outer class fieldthe Disabled checkbox DisabledWarning icon Warning
Lambda parameter hides fieldthe Disabled checkbox DisabledWarning icon Warning
Local variable hides fieldthe Disabled checkbox DisabledWarning icon Warning
Method overloads method of superclassthe Disabled checkbox DisabledWarning icon Warning
Method overrides inaccessible method of superclassthe Disabled checkbox DisabledWarning icon Warning
Method tries to override static method of superclassthe Disabled checkbox DisabledWarning icon Warning
Module exports/opens package to itselfthe Enabled checkbox EnabledWarning icon Warning
Non-accessible class is exposedthe Enabled checkbox EnabledWarning icon Warning
Parameter hides fieldthe Disabled checkbox DisabledWarning icon Warning
Type parameter hides visible typethe Enabled checkbox EnabledWarning icon Warning
Usage of service not declared in module-infothe Enabled checkbox EnabledWarning icon Warning
Last modified: 01 July 2021