IntelliJ IDEA 2022.3 Help

List of Java inspections

Arquillian

Inspection name

Default state

Default severity

Arquillian test class should be properly prepared

Enabled

Error icon Error

Arquillian test class should have method with @Deployment annotation

Enabled

Error icon Error

Arquillian test class should have only one method with @Deployment annotation

Enabled

Error icon Error

Wrong return type of @Deployment method

Enabled

Error icon Error

Wrong signature of @Deployment method

Enabled

Error icon Error

Abstraction issues

Inspection name

Default state

Default severity

Cast to a concrete class

Disabled

Warning icon Warning

Chain of instanceof checks

Disabled

Warning icon Warning

Class references one of its subclasses

Disabled

Warning icon Warning

Feature envy

Disabled

Warning icon Warning

instanceof a concrete class

Disabled

Warning icon Warning

instanceof check for this

Disabled

Warning icon Warning

Interface method clashes with method in java.lang.Object

Enabled

Warning icon Warning

Local variable of concrete class

Disabled

Warning icon Warning

Magic number

Disabled

Warning icon Warning

Method parameter to concrete class

Disabled

Warning icon Warning

Method return of concrete class

Disabled

Warning icon Warning

Optional used as field or parameter type

Enabled

Warning icon Warning

Overly strong type cast

Disabled

Warning icon Warning

Private method only used from inner class

Disabled

Warning icon Warning

public method not exposed in interface

Disabled

Warning icon Warning

public method with boolean parameter

Disabled

Warning icon Warning

Static field of concrete class

Disabled

Warning icon Warning

Static member used only from one other class

Disabled

Warning icon Warning

Type may be weakened

Disabled

Warning icon Warning

Type of instance field is concrete class

Disabled

Warning icon Warning

Assignment issues

Inspection name

Default state

Default severity

Assignment replaceable with operator assignment

Disabled

Warning icon Warning

Assignment to for loop parameter

Disabled

Warning icon Warning

Assignment to catch block parameter

Disabled

Warning icon Warning

Assignment to lambda parameter

Disabled

Warning icon Warning

Assignment to method parameter

Disabled

Warning icon Warning

Assignment to static field from instance context

Disabled

Warning icon Warning

Assignment used as condition

Disabled

Warning icon Warning

Constructor assigns value to field defined in superclass

Disabled

Warning icon Warning

null assignment

Disabled

Warning icon Warning

Results of assignment used

Disabled

Warning icon Warning

Value of ++ or -- used

Disabled

Warning icon Warning

Bitwise operation issues

Inspection name

Default state

Default severity

Incompatible bitwise mask operation

Enabled

Warning icon Warning

Pointless bitwise expression

Enabled

Warning icon Warning

Shift operation by inappropriate constant

Enabled

Warning icon Warning

Class metrics

Inspection name

Default state

Default severity

Anonymous inner class with too many methods

Disabled

Warning icon Warning

Class too deep in inheritance tree

Disabled

Warning icon Warning

Class with too many constructors

Disabled

Warning icon Warning

Class with too many fields

Disabled

Warning icon Warning

Class with too many methods

Disabled

Warning icon Warning

Inner class too deeply nested

Disabled

Warning icon Warning

Overly complex anonymous class

Disabled

Warning icon Warning

Overly complex class

Disabled

Warning icon Warning

Overly coupled class

Disabled

Warning icon Warning

Class structure

Inspection name

Default state

Default severity

Abstract class may be interface

Enabled

Info icon No highlighting, only fix

Anonymous inner class

Disabled

Warning icon Warning

Class may extend adapter instead of implementing listener

Disabled

Warning icon Warning

Class name differs from file name

Disabled

Warning icon Warning

Class with only private constructors should be declared final

Disabled

Warning icon Warning

Constant declared in abstract class

Disabled

Warning icon Warning

Constant declared in interface

Disabled

Warning icon Warning

Empty class

Disabled

Warning icon Warning

Field can be local

Enabled

Warning icon Warning

final class

Disabled

Warning icon Warning

final method

Disabled

Warning icon Warning

final method in final class

Disabled

Warning icon Warning

Inner class of interface

Disabled

Warning icon Warning

Interface may be annotated @FunctionalInterface

Disabled

Warning icon Warning

Limited-scope inner class

Disabled

Warning icon Warning

Marker interface

Disabled

Warning icon Warning

Method returns per-class constant ***

Disabled

Warning icon Warning

Multiple top level classes in single file

Disabled

Warning icon Warning

Non-op method in abstract class

Disabled

Warning icon Warning

Non-final field in enum

Disabled

Warning icon Warning

Non-static initializer

Disabled

Warning icon Warning

Parameter can be local

Enabled

Warning icon Warning

private method declared final

Enabled

Warning icon Warning

private method in final class

Disabled

Warning icon Warning

public constructor

Disabled

Warning icon Warning

public constructor in non-public class

Disabled

Warning icon Warning

Singleton

Disabled

Warning icon Warning

static, non-final field

Disabled

Warning icon Warning

static method declared final

Enabled

Warning icon Warning

Utility class

Disabled

Warning icon Warning

Utility class can be enum

Disabled

Warning icon Warning

Utility class is not final

Disabled

Warning icon Warning

Utility class with public constructor

Disabled

Warning icon Warning

Utility class without public constructor

Disabled

Warning icon Warning

Inspections labeled with *** are not available in the editor and can be launched via Code | Running Code Cleanup with profile ''{0}''… or Code | Analyze Code | Run Inspection By Name....

Cloning issues

Inspection name

Default state

Default severity

clone() does not declare CloneNotSupportedException

Enabled

Warning icon Warning

clone() instantiates objects with constructor

Disabled

Warning icon Warning

clone() method in non-Cloneabe class

Disabled

Warning icon Warning

clone() method in non-Cloneabe class

Disabled

Warning icon Warning

clone() method not public

Disabled

Warning icon Warning

clone() should have return type equal to the class it contains

Disabled

Warning icon Warning

Cloneable class without clone() method

Disabled

Warning icon Warning

Use of clone() Cloneable

Disabled

Warning icon Warning

Code maturity

Inspection name

Default state

Default severity

Call to printStackTrace()

Disabled

Warning icon Warning

Call to Thread.dumpStack()

Disabled

Warning icon Warning

Deprecated API usage

Enabled

Warning icon Warning

Deprecated method is still used

Enabled

Warning icon Warning

Inspection suppression annotation

Disabled

Warning icon Warning

Throwable printed to System.out

Enabled

Warning icon Warning

Usage of API marked for removal

Enabled

Error icon Error

Use of obsolete collection type

Disabled

Warning icon Warning

Use of obsolete date-time API

Disabled

Warning icon Warning

Use of System.out or System.err

Disabled

Warning icon Warning

Code style issues

Inspection name

Default state

Default severity

Array can be replaced with enum values

Enabled

Info icon No highlighting, only fix

Array creation without new expression

Enabled

Info icon No highlighting, only fix

assert message is not a String

Disabled

Warning icon Warning

Assignment can be joined with declaration

Enabled

Info icon No highlighting, only fix

Block marker comment

Disabled

Warning icon Warning

C-style array declaration

Enabled

Warning icon Warning

Call to String.concat() can be replaced with +

Disabled

Warning icon Warning

Can use bounded wildcard

Disabled

Warning icon Warning

Chained equality comparisons

Disabled

Warning icon Warning

Chained method calls

Disabled

Warning icon Warning

Class explicitly extends java.lang.Object

Enabled

Warning icon Warning

Code block contains single statement

Enabled

Info icon No highlighting, only fix

Conditional can be replaced with Optional

Enabled

Info icon No highlighting, only fix

Confusing octal escape sequence

Disabled

Warning icon Warning

Constant expression can be evaluated

Enabled

Info icon No highlighting, only fix

Constant on the wrong side of comparison

Disabled

Warning icon Warning

Control flow statement without braces

Enabled

Info icon No highlighting, only fix

Diamond can be replaced with explicit type arguments

Enabled

Info icon No highlighting, only fix

equals() called on Enum value

Disabled

Warning icon Warning

expression.equals("literal") rather than "literal".equals(expression)

Disabled

Warning icon Warning

Field assignment can be moved to initializer

Enabled

Info icon No highlighting, only fix

Field can be Final

Disabled

Warning icon Warning

If statement can be replaced with ?:, && or || expression

Enabled

Info icon No highlighting, only fix

Implicit call to super()

Disabled

Warning icon Warning

Instance field access not qualified with this

Disabled

Warning icon Warning

Instance field access not qualified with this

Disabled

Warning icon Warning

Labeled switch rule can have code block

Enabled

Info icon No highlighting, only fix

Labeled switch rule has redundant code block

Enabled

Warning icon Warning

Lambda body can be code block

Enabled

Info icon No highlighting, only fix

Lambda can be replaced with anonymous class

Enabled

Info icon No highlighting, only fix

Lambda parameter type can be specified

Enabled

Info icon No highlighting, only fix

'List.indexOf()' expression is replaceable with contains()

Disabled

Warning icon Warning

Local variable or parameter can be final

Disabled

Warning icon Warning

Method reference can be replaced with lambda

Enabled

Info icon No highlighting, only fix

Missorted modifiers

Disabled

Warning icon Warning

Multi-catch can be split into separate catch blocks

Enabled

Info icon No highlighting, only fix

Multiple variables in one declaration

Enabled

Info icon No highlighting, only fix

Nested method call

Disabled

Warning icon Warning

Null value for Optional type

Enabled

Warning icon Warning

Objects.equals() can be replaced with equals()

Enabled

Info icon No highlighting, only fix

Optional can be replaced with sequence of if statements

Enabled

Info icon No highlighting, only fix

Optional contains array or collection

Disabled

Warning icon Warning

Optional.isPresent() can be replaced with functional-style expression

Enabled

Warning icon Warning

Raw type can be generic

Enabled

Info icon No highlighting, only fix

Redundant new expression in constant array creation

Disabled

Warning icon Warning

Redundant field initialization

Disabled

Warning icon Warning

Redundant interface declaration

Disabled

Warning icon Warning

Redundant no-arg constructor

Disabled

Warning icon Warning

return separated from the result computation

Enabled

Info icon No highlighting, only fix

Return of this

Disabled

Warning icon Warning

Simplifiable annotation

Disabled

Warning icon Warning

Single-element annotation

Enabled

Info icon No highlighting, only fix

size() == 0 replaceable with isEmpty()

Disabled

Warning icon Warning

Standard Charset object can be used

Enabled

Warning icon Warning

Stream API call chain can be replaced with loop

Enabled

Info icon No highlighting, only fix

Subsequent steps can be fused into Stream API chain

Enabled

Warning icon Warning

try statement with multiple resources can be split

Enabled

Info icon No highlighting, only fix

Type parameter explicitly extends java.lang.Object

Enabled

Warning icon Warning

Unclear expression

Enabled

Info icon No highlighting, only fix

Unnecessarily qualified inner class access

Enabled

Info icon No highlighting, only fix

Unnecessarily qualified static access

Disabled

Warning icon Warning

Unnecessarily qualified statically imported element

Disabled

Warning icon Warning

Unnecessary final on local variable or parameter

Disabled

Warning icon Warning

Unnecessary null check before equals() call

Disabled

Warning icon Warning

Unnecessary super qualifier

Disabled

Warning icon Warning

Unnecessary this qualifier

Disabled

Warning icon Warning

Unnecessary call to super()

Disabled

Warning icon Warning

Unnecessary call to toString()

Disabled

Warning icon Warning

Unnecessary code block

Enabled

Info icon No highlighting, only fix

Unnecessary conversion to String

Enabled

Warning icon Warning

Unnecessary enum modifier

Enabled

Warning icon Warning

Unnecessary fully qualified name

Enabled

Info icon No highlighting, only fix

Unnecessary interface modifier

Enabled

Warning icon Warning

Unnecessary parentheses

Enabled

Info icon No highlighting, only fix

Unnecessary qualifier for this or super

Disabled

Warning icon Warning

Unnecessary semicolon

Enabled

Warning icon Warning

Unqualified inner class access

Disabled

Warning icon Warning

Unqualified static access

Disabled

Warning icon Warning

Compiler issues

Inspection name

Default state

Default severity

Javac quirks

Enabled

Warning icon Warning

Unchecked warning

Enabled

Warning icon Warning

Concurrency annotation issues

Inspection name

Default state

Default severity

Instance member guarded by static field

Disabled

Warning icon Warning

Non-final @GuardedBy field

Disabled

Warning icon Warning

Non-final field in @Immutable class

Disabled

Warning icon Warning

Static member guarded by instance filed or this

Disabled

Warning icon Warning

Unguarded field access

Disabled

Warning icon Warning

Unknown @GuardedBy field

Disabled

Warning icon Warning

Control flow issues

Inspection name

Default state

Default severity

Assertion can be replaced with if statement

Enabled

Info icon No highlighting, only fix

Boolean expression could be replaced with conditional expression

Disabled

Warning icon Warning

break statement with label

Disabled

Warning icon Warning

break statement

Disabled

Warning icon Warning

Conditional break inside infinite loop

Enabled

Warning icon Warning

Conditional can be pushed inside branch expression

Enabled

Info icon No highlighting, only fix

Conditional expression (?:)

Enabled

Info icon No highlighting, only fix

Conditional expression with identical branches

Disabled

Warning icon Warning

Conditional expression with negated condition

Disabled

Warning icon Warning

Constant conditional expression

Enabled

Warning icon Warning

continue statement with label

Disabled

Warning icon Warning

continue statement

Disabled

Warning icon Warning

default not last case in switch statement

Disabled

Warning icon Warning

Double negation

Enabled

Warning icon Warning

Duplicate condition in if statement

Enabled

Warning icon Warning

Duplicate condition on && or ||

Disabled

Warning icon Warning

Enum switch statement that misses case

Enabled

Info icon No highlighting, only fix

Fallthrough in switch statement

Disabled

Warning icon Warning

for loop may be replaced with while loop

Enabled

Info icon No highlighting, only fix

for loop with missing components

Disabled

Warning icon Warning

Idempotent loop body

Enabled

Warning icon Warning

if statement could be replaced with conditional expression

Disabled

Warning icon Warning

if statement with common parts

Enabled

Weak Warning icon Weak Warning

if statement with negated condition

Disabled

Warning icon Warning

if statement with too many branches

Disabled

Warning icon Warning

Infinite loop statement

Enabled

Warning icon Warning

Labeled statement

Disabled

Warning icon Warning

Local variable used and declared in different switch branches

Disabled

Warning icon Warning

Loop statement that does not loop

Enabled

Warning icon Warning

Loop variable not updated inside loop

Enabled

Warning icon Warning

Loop with implicit termination condition

Disabled

Warning icon Warning

Negated conditional expression

Disabled

Warning icon Warning

Negated equality expression

Disabled

Warning icon Warning

Nested switch

Disabled

Warning icon Warning

Nested conditional expression

Disabled

Warning icon Warning

Overly complex boolean expression

Disabled

Warning icon Warning

Pointless indexOf() comparison

Disabled

Warning icon Warning

Pointless boolean expression

Enabled

Warning icon Warning

Redundant else

Enabled

Info icon No highlighting, only fix

Redundant if statement

Enabled

Warning icon Warning

Redundant conditional expression

Enabled

Warning icon Warning

Simplifiable boolean expression

Enabled

Warning icon Warning

Simplifiable conditional expression

Enabled

Warning icon Warning

Statement can be replaced with assert or Objects.requireNonNull

Enabled

Info icon No highlighting, only fix

switch statement

Disabled

Warning icon Warning

switch statement with too few branches

Enabled

Warning icon Warning

switch statement with too low of a branch density

Disabled

Warning icon Warning

switch statement with too many branches

Disabled

Warning icon Warning

switch statement without default branch

Enabled

Info icon No highlighting, only fix

Unnecessary null check before method call

Enabled

Warning icon Warning

Data flow

Inspection name

Default state

Default severity

Boolean method is always inverted

Enabled

Warning icon Warning

Boolean variable is always inverted

Disabled

Warning icon Warning

Method call violates Law of Demeter

Disabled

Warning icon Warning

Negatively named boolean variable

Disabled

Warning icon Warning

Redundant local variable

Enabled

Warning icon Warning

Reuse of local variable

Disabled

Warning icon Warning

Scope of variable is too broad

Enabled

Info icon No highlighting, only fix

Use of variable whose value is known to be constant

Disabled

Warning icon Warning

Declaration redundancy

Inspection name

Default state

Default severity

Access static member via instance reference

Enabled

Warning icon Warning

Actual method parameter is the same constant

Enabled

Warning icon Warning

Collector can be simplified

Enabled

Warning icon Warning

Declaration access can be weaker

Disabled

Warning icon Warning

Declaration can have final modifier ***

Enabled

Warning icon Warning

Default annotation parameter value

Enabled

Warning icon Warning

Duplicate throws

Enabled

Warning icon Warning

Empty method ***

Enabled

Warning icon Warning

Functional expression can be folded

Enabled

Warning icon Warning

Method can be void

Enabled

Warning icon Warning

Method returns the same value ***

Enabled

Warning icon Warning

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

Enabled

Warning icon Warning

Optional call chain can be simplified

Enabled

Warning icon Warning

Redundant close()

Enabled

Warning icon Warning

Redundant requires statement in module-info ***

Enabled

Warning icon Warning

Redundant throws clause

Enabled

Warning icon Warning

Redundant lambda parameter types

Enabled

Info icon No highlighting, only fix

Redundant operation on empty container

Enabled

Warning icon Warning

Redundant step in Stream or Optional call chain

Enabled

Warning icon Warning

Stream API call chain can be simplified

Enabled

Warning icon Warning

Trivial usage of functional expression

Enabled

Warning icon Warning

Unnecessary module dependency

Enabled

Warning icon Warning

Unused declaration

Enabled

Warning icon Warning

Unused label

Enabled

Warning icon Warning

Variable is assigned to itself

Enabled

Warning icon Warning

Wrapper type may be primitive

Enabled

Warning icon Warning

Inspections labeled with *** are not available in the editor and can be launched via Code | Running Code Cleanup with profile ''{0}''… or Code | Analyze Code | Run Inspection By Name....

Dependency issues

Inspection name

Default state

Default severity

Class with too many dependencies ***

Disabled

Warning icon Warning

Class with too many dependents ***

Disabled

Warning icon Warning

Class with too many transitive dependencies ***

Disabled

Warning icon Warning

Class with too many transitive dependents ***

Disabled

Warning icon Warning

Cyclic class dependency ***

Disabled

Warning icon Warning

Cyclic package dependency ***

Disabled

Warning icon Warning

Illegal package dependencies

Enabled

Error icon Error

Suspicious package-private access

Disabled

Warning icon Warning

Inspections labeled with *** are not available in the editor and can be launched via Code | Running Code Cleanup with profile ''{0}''… or Code | Analyze Code | Run Inspection By Name....

Encapsulation

Inspection name

Default state

Default severity

Accessing a non-public field of another object

Disabled

Warning icon Warning

Assignment or return of field with mutable type

Disabled

Warning icon Warning

Package-visible field

Disabled

Warning icon Warning

Package-visible nested class

Disabled

Warning icon Warning

Protected field

Disabled

Warning icon Warning

Protected nested class

Disabled

Warning icon Warning

public field

Enabled

Info icon No highlighting, only fix

public nested class

Disabled

Warning icon Warning

Error handling

Inspection name

Default state

Default severity

Catch block may ignore exception

Enabled

Warning icon Warning

Caught exception is immediately rethrown

Enabled

Warning icon Warning

Checked exception class

Disabled

Warning icon Warning

Class directly extends java.lang.Throwable

Disabled

Warning icon Warning

continue or break inside finally block

Enabled

Warning icon Warning

Empty finally block

Enabled

Warning icon Warning

Empty try block

Enabled

Warning icon Warning

Exception constructor called without arguments

Disabled

Warning icon Warning

finally block which cannot complete normally

Enabled

Warning icon Warning

instanceof on catch parameter

Disabled

Warning icon Warning

java.lang.Error not rethrown

Disabled

Warning icon Warning

java.lang.ThreadDeath not rethrown

Disabled

Warning icon Warning

Nested try statement

Disabled

Warning icon Warning

Non-final field of exception class

Disabled

Warning icon Warning

null thrown

Disabled

Warning icon Warning

Overly broad catch block

Disabled

Warning icon Warning

Overly broad throws clause

Disabled

Warning icon Warning

Prohibited exception caught

Disabled

Warning icon Warning

Prohibited exception declared

Disabled

Warning icon Warning

Prohibited exception thrown

Disabled

Warning icon Warning

return inside finally block

Enabled

Warning icon Warning

throw caught by containing try statement

Disabled

Warning icon Warning

throw inside catch block which ignores the caught exception

Disabled

Warning icon Warning

throw inside finally block

Enabled

Warning icon Warning

Unchecked exception class

Disabled

Warning icon Warning

Unchecked exception declared in throws clause

Disabled

Warning icon Warning

Unnecessary call to Throwable.initCause()

Enabled

Warning icon Warning

Finalization

Inspection name

Default state

Default severity

finalize() called explicitly

Enabled

Warning icon Warning

finalize() declaration

Disabled

Warning icon Warning

finalize() not declared protected

Disabled

Warning icon Warning

General

Inspection name

Default state

Default severity

Test-only class or method call in production code

Disabled

Warning icon Warning

Imports

Inspection name

Default state

Default severity

* import

Disabled

Warning icon Warning

Import from same package

Disabled

Warning icon Warning

java.lang import

Disabled

Warning icon Warning

Single class import

Disabled

Warning icon Warning

Static import

Disabled

Warning icon Warning

Unused import

Enabled

Warning icon Warning

Inheritance issues

Inspection name

Default state

Default severity

Abstract class extends concrete class

Disabled

Warning icon Warning

Abstract class which has no concrete subclass

Disabled

Warning icon Warning

Abstract class without abstract methods

Disabled

Warning icon Warning

Abstract method overrides abstract method

Disabled

Warning icon Warning

Abstract method overrides concrete method

Disabled

Warning icon Warning

Abstract method with missing implementations

Disabled

Warning icon Warning

Class explicitly extends a Collection class

Disabled

Warning icon Warning

Class extends annotation interface

Enabled

Warning icon Warning

Class extends utility class

Disabled

Warning icon Warning

Class may extend a commonly used base class

Enabled

Info icon No highlighting, only fix

Final declaration can't be overridden at runtime

Enabled

Error icon Error

Interface which has no concrete subclass

Disabled

Warning icon Warning

Method does not call super method

Enabled

Warning icon Warning

Method is identical to its super method

Disabled

Warning icon Warning

Missing @Override annotation

Enabled

Info icon No highlighting, only fix

Non-varargs method overrides varargs method

Disabled

Warning icon Warning

Parameter type prevents overriding

Disabled

Warning icon Warning

public constructor in abstract class

Disabled

Warning icon Warning

Static inheritance

Disabled

Warning icon Warning

Type parameter extends final class

Disabled

Warning icon Warning

Initialization

Inspection name

Default state

Default severity

Abstract method called during object construction

Disabled

Warning icon Warning

Double brace initialization

Enabled

Info icon No highlighting, only fix

Instance field may not be initialized

Disabled

Warning icon Warning

Instance field used before initialization

Disabled

Warning icon Warning

Non-final static field is used during class initialization

Disabled

Warning icon Warning

Overridable method called during object construction

Disabled

Warning icon Warning

Overridden method called during object construction

Disabled

Warning icon Warning

Static field may not be initialized

Disabled

Warning icon Warning

Static field used before initialization

Disabled

Warning icon Warning

this reference escaped in object construction

Disabled

Warning icon Warning

Unsafe lazy initialization of static field

Disabled

Warning icon Warning

Internationalization

Inspection name

Default state

Default severity

Absolute alignment used in AWT/Swing code

Disabled

Warning icon Warning

Call to Date.toString()

Disabled

Warning icon Warning

Call to String.toUpperCase() or codetoLowerCase() without a Locale

Disabled

Warning icon Warning

Call to Time.toString()

Disabled

Warning icon Warning

Call to Numeric toString()

Disabled

Warning icon Warning

Call to suspicious String method

Disabled

Warning icon Warning

Character comparison

Disabled

Warning icon Warning

Duplicate string literal

Disabled

Warning icon Warning

Hard coded strings

Disabled

Warning icon Warning

Implicit usage of platformcodes default charset

Disabled

Warning icon Warning

Incorrect string capitalization

Enabled

Warning icon Warning

Instantiating a SimpleDateFormat without a Locale

Disabled

Warning icon Warning

Magic character

Disabled

Warning icon Warning

String concatenation

Disabled

Warning icon Warning

Unnecessary unicode escape sequence

Disabled

Warning icon Warning

Use of StringTokenizer

Disabled

Warning icon Warning

J2ME issues

Inspection name

Default state

Default severity

Abstract class which has only one direct inheritor

Disabled

Warning icon Warning

Array.length in loop condition

Disabled

Warning icon Warning

Connection opened but not safely closed

Disabled

Warning icon Warning

Interface which has only one direct inheritor

Disabled

Warning icon Warning

Large array allocation with no OutOfMemoryError check

Disabled

Warning icon Warning

Method call in loop condition

Disabled

Warning icon Warning

Multiply or divide by power of two

Disabled

Warning icon Warning

Overly large initializer for array of primitive type

Disabled

Warning icon Warning

RecordStore opened but not safely closed

Disabled

Warning icon Warning

Single character startsWith() or codeendsWith()

Disabled

Warning icon Warning

Synthetic accessor call

Disabled

Warning icon Warning

Java language level

Inspection name

Default state

Default severity

Annotation

Disabled

Warning icon Warning

Annotation class

Disabled

Warning icon Warning

assert statement

Disabled

Warning icon Warning

Auto-boxing

Disabled

Warning icon Warning

Auto-unboxing

Disabled

Warning icon Warning

Enumerated class

Disabled

Warning icon Warning

Extended for statement

Disabled

Warning icon Warning

Use of assert as identifier

Disabled

Warning icon Warning

Use of enum as identifier

Disabled

Warning icon Warning

Varargs method

Enabled

Info icon No highlighting, only fix

Java language level migration aids

Inspection name

Default state

Default severity

compare() method can be used to compare numbers

Enabled

Warning icon Warning

Enumeration can be iteration

Disabled

Warning icon Warning

if replaceable with switch

Enabled

Warning icon Warning

Usages of API which isn't available at the configured language level

Enabled

Error icon Error

Java 5

BigDecimal legacy method called

Disabled

Warning icon Warning

Collections.EMPTY_* field access replaceable with Collections.empty*() method call

Disabled

Warning icon Warning

for loop replaceable with enhanced for loop

Enabled

Warning icon Warning

String.indexOf() expression is replaceable with contains()

Enabled

Warning icon Warning

Method can be varargs method

Enabled

Info icon No highlighting, only fix

Raw use of parameterized class

Enabled

Warning icon Warning

StringBuffer may be StringBuilder

Enabled

Warning icon Warning

Unnecessary boxing

Enabled

Warning icon Warning

Unnecessary unboxing

Enabled

Warning icon Warning

while loop replaceable with enhanced for loop

Enabled

Warning icon Warning

Java 7

equals() expression replaceable by Objects.equals() expression

Enabled

Weak Warning icon Weak Warning

Explicit type can be replaced with <>

Enabled

Warning icon Warning

Identical catch branches in try statement

Enabled

Warning icon Warning

Possible heap pollution from parameterized vararg type

Enabled

Warning icon Warning

try finally replaceable with try with resources

Enabled

Warning icon Warning

Java 8

Anonymous type can be replaced with lambda

Enabled

Warning icon Warning

Anonymous type can be replaced with method reference

Enabled

Warning icon Warning

Anonymous type has shorter lambda alternative

Enabled

Warning icon Warning

Collections.sort() can be replaced with List.sort()

Enabled

Warning icon Warning

Comparator combinator can be used

Enabled

Warning icon Warning

Expression can be folded into Stream chain

Enabled

Info icon No highlighting, only fix

forEach call can be simplified

Enabled

Info icon No highlighting, only fix

Guava's functional primitives can be replaced by Java

Enabled

Warning icon Warning

Lambda can be replaced with method call

Enabled

Info icon No highlighting, only fix

Lambda can be replaced with method reference

Enabled

Warning icon Warning

Loop can be collapsed with Stream API

Enabled

Info icon No highlighting, only fix

Loop can be replaced with Collection.removeIf()

Enabled

Warning icon Warning

Map.forEach can be used

Enabled

Warning icon Warning

Pseudo functional expression using static class

Enabled

Warning icon Warning

Single Map method can be used

Enabled

Warning icon Warning

Statement lambda can be replaced with expression lambda

Enabled

Warning icon Warning

Java 9

Dependencies on automatic modules

Enabled

Warning icon Warning

Immutable collection creation can be replaced with collection factory call

Enabled

Warning icon Warning

Null check can be replaced with method call

Enabled

Warning icon Warning

Java 10

Local variable type can be omitted

Enabled

Info icon No highlighting, only fix

Variable type can be explicit

Enabled

Info icon No highlighting, only fix

Java 11

Files.readString() or Files.writeString() can be used

Enabled

Info icon No highlighting, only fix

String.repeat() can be used

Enabled

Info icon No highlighting, only fix

Java 13

New style switch can be replaced with old style one

Enabled

Info icon No highlighting, only fix

Statement can be replaced with enhanced switch

Enabled

Warning icon Warning

Text block can be replaced with regular string literal

Enabled

Info icon No highlighting, only fix

Text block can be used

Enabled

Warning icon Warning

JavaBeans issues

Inspection name

Default state

Default severity

Class without constructor

Disabled

Warning icon Warning

Class without no-arg constructor

Disabled

Warning icon Warning

Field has setter but no getter

Disabled

Warning icon Warning

Property value set to itself

Disabled

Warning icon Warning

Suspicious getter/setter

Disabled

Warning icon Warning

JavaDoc

Inspection name

Default state

Default severity

<code>...</code> can be replaced with {@code ...}

Disabled

Warning icon Warning

Dangling Javadoc comment

Enabled

Warning icon Warning

Declaration has Javadoc problems

Enabled

Warning icon Warning

Declaration has problems in Javadoc references

Enabled

Error icon Error

HTML problems in Javadoc (DocLint)

Disabled

Error icon Error

Missing package-info.java

Disabled

Warning icon Warning

Missing @Deprecated annotation

Disabled

Warning icon Warning

package-info.java without package statement

Disabled

Warning icon Warning

package.html may be converted to package-info.java

Disabled

Warning icon Warning

Unnecessary Javadoc link

Disabled

Warning icon Warning

Unnecessary {@inheritDoc} Javadoc comment

Disabled

Warning icon Warning

JUnit

Inspection name

Default state

Default severity

assertEquals() between objects of inconvertible types

Enabled

Warning icon Warning

assertEquals() called on array

Disabled

Warning icon Warning

assertEquals() may be assertSame()

Disabled

Warning icon Warning

Assertion expression can be replaced with assertThat method call

Disabled

Warning icon Warning

Constant JUnit assert argument

Disabled

Warning icon Warning

Expected exception never thrown in test method body

Disabled

Warning icon Warning

Highlight problem line in test

Enabled

Warning icon Warning

JUnit test annotated with @Ignore/@Disabled

Disabled

Warning icon Warning

JUnit test method in product source

Disabled

Warning icon Warning

JUnit test method without any assertions

Disabled

Warning icon Warning

JUnit TestCase in product source

Disabled

Warning icon Warning

JUnit TestCase with non-trivial constructors

Disabled

Warning icon Warning

JUnit 4 test can be JUnit 5

Disabled

Warning icon Warning

JUnit 4 test method in class extending JUnit 3 TestCase

Enabled

Warning icon Warning

JUnit 5 malformed @Nested class

Enabled

Warning icon Warning

JUnit 5 malformed parameterized test

Enabled

Warning icon Warning

JUnit 5 malformed repeated test

Enabled

Warning icon Warning

Malformed setUp() or tearDown() method

Disabled

Warning icon Warning

Malformed @Before or @After method

Enabled

Warning icon Warning

Malformed @BeforeClass/@BeforeAll or @AfterClass/@AfterAll method

Enabled

Warning icon Warning

Malformed @DataPoint field

Disabled

Warning icon Warning

Malformed @Rule/@ClassRule field

Disabled

Warning icon Warning

Malformed test method

Enabled

Warning icon Warning

Message missing on JUnit assertion

Disabled

Warning icon Warning

Misordered assertEquals() arguments

Disabled

Warning icon Warning

Multiple exceptions declared on test method

Disabled

Warning icon Warning

Obsolete assertions in JUnit 5 tests

Disabled

Warning icon Warning

Old style JUnit test method in JUnit 4 class

Disabled

Warning icon Warning

@RunWith(JUnitPlatform.class) without test methods

Enabled

Warning icon Warning

@RunWith(Parameterized.class) without data provider

Disabled

Warning icon Warning

Simplifiable JUnit assertion

Enabled

Warning icon Warning

suite() method not declared static

Enabled

Warning icon Warning

super.tearDown() not called from finally block

Disabled

Warning icon Warning

Test class with no tests

Disabled

Warning icon Warning

Unconstructable JUnit TestCase

Enabled

Warning icon Warning

Usage of obsolete junit.framework.Assert method

Disabled

Warning icon Warning

Logging

Inspection name

Default state

Default severity

Class with multiple loggers

Disabled

Warning icon Warning

Class without logger

Disabled

Warning icon Warning

Log condition does not match logging call

Disabled

Warning icon Warning

Logger initialized with foreign class

Disabled

Warning icon Warning

Logging call not guarded by log condition

Disabled

Warning icon Warning

Non-constant logger

Disabled

Warning icon Warning

Non-constant string concatenation as argument to logging call

Disabled

Warning icon Warning

Number of placeholders does not match number of arguments in logging call

Enabled

Warning icon Warning

public method without logging

Disabled

Warning icon Warning

Memory

Inspection name

Default state

Default severity

Anonymous class may be a named static inner class

Disabled

Warning icon Warning

Calls to System.gc() or Runtime.gc()

Disabled

Warning icon Warning

Inner class may be static

Enabled

Warning icon Warning

Return of instance of anonymous, local or inner class

Disabled

Warning icon Warning

Static collection

Disabled

Warning icon Warning

StringBuilder field

Disabled

Warning icon Warning

Unnecessary zero length array usage

Enabled

Warning icon Warning

Zero-length array allocation

Disabled

Warning icon Warning

Method metrics

Inspection name

Default state

Default severity

Constructor with too many parameters

Disabled

Warning icon Warning

Method with more than three negations

Disabled

Warning icon Warning

Method with multiple loops

Disabled

Warning icon Warning

Method with multiple return points

Disabled

Warning icon Warning

Method with too many exceptions declared

Disabled

Warning icon Warning

Method with too many parameters

Disabled

Warning icon Warning

Overly complex method

Disabled

Warning icon Warning

Overly coupled method

Disabled

Warning icon Warning

Overly long lambda expression

Disabled

Warning icon Warning

Overly long method

Disabled

Warning icon Warning

Overly nested method

Disabled

Warning icon Warning

Modularization issues

Inspection name

Default state

Default severity

Class independent of its module ***

Disabled

Warning icon Warning

Class only used from one other module ***

Disabled

Warning icon Warning

Inconsistent language level settings ***

Disabled

Warning icon Warning

Module with too few classes ***

Disabled

Warning icon Warning

Module with too many classes ***

Disabled

Warning icon Warning

Inspections labeled with *** are not available in the editor and can be launched via Code | Running Code Cleanup with profile ''{0}''… or Code | Analyze Code | Run Inspection By Name....

Naming conventions

Inspection name

Default state

Default severity

Boolean method name must start with question word

Disabled

Warning icon Warning

Class name prefixed with package name

Disabled

Warning icon Warning

Class name same as ancestor name

Disabled

Warning icon Warning

Class naming convention

Disabled

Warning icon Warning

Confusing main() method

Disabled

Warning icon Warning

Exception class name does not end with Exception

Disabled

Warning icon Warning

Field naming convention

Disabled

Warning icon Warning

Java module naming conventions

Enabled

Warning icon Warning

Lambda parameter naming convention

Disabled

Warning icon Warning

Lambda-unfriendly method overload

Disabled

Warning icon Warning

Local variable naming convention

Disabled

Warning icon Warning

Method name same as class name

Enabled

Warning icon Warning

Method name same as parent class name

Disabled

Warning icon Warning

Method names differing only by case

Disabled

Warning icon Warning

Method naming convention

Disabled

Warning icon Warning

Method parameter naming convention

Disabled

Warning icon Warning

Non-boolean method name must not start with question word

Disabled

Warning icon Warning

Non-constant field with upper-case name

Disabled

Warning icon Warning

Non-exception class name ends with Exception

Disabled

Warning icon Warning

Overloaded methods with same number of parameters

Disabled

Warning icon Warning

Overloaded varargs method

Disabled

Warning icon Warning

Package naming convention

Disabled

Warning icon Warning

Parameter name differs from parameter in overridden method

Disabled

Warning icon Warning

Questionable name

Disabled

Warning icon Warning

Standard variable names

Disabled

Warning icon Warning

Use of $ in identifier

Disabled

Warning icon Warning

Numeric issues

Inspection name

Default state

Default severity

Call to BigDecimal method without a rounding mode argument

Enabled

Warning icon Warning

char expression used in arithmetic context

Disabled

Warning icon Warning

Comparison of short and char values

Disabled

Warning icon Warning

Comparison to Double.NaN or Float.NaN

Enabled

Warning icon Warning

Confusing floating-point literal

Disabled

Warning icon Warning

Constant call to java.lang.Math

Disabled

Warning icon Warning

Divide by zero

Enabled

Warning icon Warning

double literal cast to float could be float literal

Disabled

Warning icon Warning

equals() called on java.math.BigDecimal

Disabled

Warning icon Warning

Floating point equality comparison

Disabled

Warning icon Warning

Implicit numeric conversion

Disabled

Warning icon Warning

int literal cast to long could be long literal

Disabled

Warning icon Warning

Integer division in floating point context

Enabled

Warning icon Warning

Integer multiplication or shift implicitly cast to long

Disabled

Warning icon Warning

long literal ending with l instead of L

Enabled

Warning icon Warning

Non-reproducible call to java.lang.Math

Disabled

Warning icon Warning

Number constructor call with primitive argument

Enabled

Warning icon Warning

Numeric cast that loses precision

Disabled

Warning icon Warning

Numeric overflow

Enabled

Warning icon Warning

Octal and decimal integers in same array

Disabled

Warning icon Warning

Octal integer

Enabled

Warning icon Warning

Overly complex arithmetic expression

Disabled

Warning icon Warning

Pointless arithmetic expression

Enabled

Warning icon Warning

Suspicious test for oddness

Disabled

Warning icon Warning

Suspicious underscore in number literal

Disabled

Warning icon Warning

Unary plus

Disabled

Warning icon Warning

Unnecessary explicit numeric cast

Disabled

Warning icon Warning

Unnecessary unary minus

Disabled

Warning icon Warning

Unpredictable BigDecimal constructor call

Enabled

Warning icon Warning

Packaging issues

Inspection name

Default state

Default severity

Class independent of its package ***

Disabled

Warning icon Warning

Class only used from one other package ***

Disabled

Warning icon Warning

Empty directory ***

Disabled

Warning icon Warning

Exception package ***

Disabled

Warning icon Warning

Package with classes in multiple modules ***

Disabled

Warning icon Warning

Package with disjoint dependency graph ***

Disabled

Warning icon Warning

Package with too few classes ***

Disabled

Warning icon Warning

Package with too many classes ***

Disabled

Warning icon Warning

Inspections labeled with *** are not available in the editor and can be launched via Code | Running Code Cleanup with profile ''{0}''… or Code | Analyze Code | Run Inspection By Name....

Performance

Inspection name

Default state

Default severity

Boolean constructor call

Enabled

Warning icon Warning

Boxing of already boxed value

Enabled

Warning icon Warning

Bulk operation can be used instead of iteration

Enabled

Warning icon Warning

Call to Arrays.asList() with too few arguments

Enabled

Warning icon Warning

Call to simple getter from within class

Disabled

Warning icon Warning

Call to simple setter from within class

Disabled

Warning icon Warning

Class initializer may be static

Enabled

Warning icon Warning

Collection.toArray() call style

Enabled

Warning icon Warning

Collection without initial capacity

Disabled

Warning icon Warning

Concatenation with empty string

Disabled

Warning icon Warning

Dynamic regular expression could be replaced by compiled Pattern

Disabled

Warning icon Warning

equals() call can be replaced with ==

Enabled

Info icon No highlighting, only fix

equals() or hashCode() called on java.net.URL object

Disabled

Warning icon Warning

Explicit argument can be lambda

Enabled

Info icon No highlighting, only fix

Field may be static

Disabled

Warning icon Warning

Inefficient Stream API call chains ending with count()

Enabled

Warning icon Warning

Instantiating object to get Class object

Enabled

Warning icon Warning

Iteration over keySet() may be optimized

Disabled

Warning icon Warning

List.remove() called in loop

Enabled

Warning icon Warning

Loop can be terminated after condition is met

Enabled

Warning icon Warning

Manual array copy

Enabled

Warning icon Warning

Manual array to collection copy

Enabled

Warning icon Warning

Map or Set may contain java.net.URL objects

Disabled

Warning icon Warning

Map replaceable with EnumMap

Disabled

Warning icon Warning

Method may be static

Disabled

Warning icon Warning

Non-constant String should be StringBuilder

Disabled

Warning icon Warning

Object allocation in loop

Disabled

Warning icon Warning

Object instantiation inside equals() or hashCode()

Disabled

Warning icon Warning

Redundant Collection.addAll() call

Enabled

Warning icon Warning

Redundant call to String.format()

Enabled

Warning icon Warning

Set replaceable with EnumSet

Disabled

Warning icon Warning

Single character string argument in String.indexOf() call

Disabled

Warning icon Warning

Single character string concatenation

Enabled

Info icon No highlighting, only fix

String.equals("")

Disabled

Warning icon Warning

String concatenation as argument to StringBuilder.append() call

Enabled

Warning icon Warning

String concatenation in loop

Enabled

Warning icon Warning

StringBuilder.toString() in concatenation

Disabled

Warning icon Warning

StringBuilder without initial capacity

Disabled

Warning icon Warning

Tail recursion

Enabled

Info icon No highlighting, only fix

Unnecessary temporary object in conversion from String

Enabled

Warning icon Warning

Unnecessary temporary object in conversion to String

Enabled

Warning icon Warning

Using Random.nextDouble() to get random integer

Disabled

Warning icon Warning

Portability

Inspection name

Default state

Default severity

Call to Runtime.exec()

Disabled

Warning icon Warning

Call to System.exit() or related methods

Disabled

Warning icon Warning

Call to System.getenv()

Disabled

Warning icon Warning

Hardcoded file separator

Disabled

Warning icon Warning

Hardcoded line separator

Disabled

Warning icon Warning

Native method

Disabled

Warning icon Warning

Use of java.lang.ProcessBuilder class

Disabled

Warning icon Warning

Use of AWT peer class

Disabled

Warning icon Warning

Use of concrete JDBC driver class

Disabled

Warning icon Warning

Use of sun.* classes

Disabled

Warning icon Warning

Probable bugs

Nullability problems

Inspection name

Default state

Default severity

@NotNull field is not initialized

Enabled

Warning icon Warning

@NotNull/@Nullable problems

Enabled

Warning icon Warning

Return of null

Disabled

Warning icon Warning

Inspection name

Default state

Default severity

Array comparison using ==, instead of Arrays.equals()

Disabled

Warning icon Warning

assert statement condition is constant

Disabled

Warning icon Warning

assert statement with side effects

Enabled

Warning icon Warning

Call to toString() on array

Enabled

Warning icon Warning

Call to String.replaceAll(".", ...)

Enabled

Warning icon Warning

Call to default toString()

Disabled

Warning icon Warning

Cast conflicts with instanceof

Disabled

Warning icon Warning

Casting to incompatible interface

Disabled

Warning icon Warning

Class.getClass() call

Enabled

Warning icon Warning

Cleaner captures object reference

Enabled

Warning icon Warning

Collection added to self

Enabled

Warning icon Warning

Comparable implemented but equals() not overridden

Disabled

Warning icon Warning

Confusing argument to varargs method

Enabled

Warning icon Warning

Confusing primitive array argument to varargs method

Enabled

Warning icon Warning

Constant conditions & exceptions

Enabled

Warning icon Warning

Contract issues

Enabled

Warning icon Warning

Copy constructor misses field

Enabled

Warning icon Warning

Covariant equals()

Disabled

Warning icon Warning

Duplicated delimiters in java.util.StringTokenizer

Enabled

Warning icon Warning

Empty class initializer

Disabled

Warning icon Warning

equal() instead of equals()

Disabled

Warning icon Warning

equals() and hashCode() not paired

Disabled

Warning icon Warning

equals() between objects of inconvertible types

Enabled

Warning icon Warning

equals() called on StringBuilder

Enabled

Warning icon Warning

equals() called on array

Enabled

Warning icon Warning

equals() called on itself

Enabled

Warning icon Warning

equals() method which does not check class of parameter

Enabled

Warning icon Warning

hashCode() called on array

Enabled

Warning icon Warning

Infinite recursion

Enabled

Warning icon Warning

Inner class referenced via subclass

Disabled

Warning icon Warning

instanceof with incompatible interface

Disabled

Warning icon Warning

Instantiation of utility class

Disabled

Warning icon Warning

Invalid method reference used for Comparator

Enabled

Warning icon Warning

Iterable is used as vararg

Enabled

Warning icon Warning

Iterator.hasNext() which calls next()

Disabled

Warning icon Warning

Iterator.next() which can't throw NoSuchElementException

Disabled

Warning icon Warning

Loop executes zero or billions times

Enabled

Warning icon Warning

Magic Constant

Enabled

Warning icon Warning

Malformed format string

Enabled

Warning icon Warning

Malformed regular expression

Disabled

Warning icon Warning

Malformed XPath expression

Enabled

Warning icon Warning

Math.random() cast to int

Enabled

Warning icon Warning

Mismatched case in String operation

Enabled

Warning icon Warning

Mismatched query and update of StringBuilder

Enabled

Warning icon Warning

Mismatched query and update of collection

Enabled

Warning icon Warning

Mismatched read and write of array

Enabled

Warning icon Warning

New object is compared using ==

Enabled

Warning icon Warning

Non-final field referenced in compareTo()

Disabled

Warning icon Warning

Non-final field referenced in equals()

Disabled

Warning icon Warning

Non-final field referenced in hashCode()

Disabled

Warning icon Warning

Non-short-circuit boolean expression

Disabled

Warning icon Warning

Non-short-circuit operation consumes the infinite stream

Enabled

Warning icon Warning

Number comparison using ==, instead of equals()

Enabled

Warning icon Warning

Object comparison using ==, instead of equals()

Enabled

Info icon No highlighting, only fix

Objects.equals() called on arrays

Enabled

Warning icon Warning

Optional.get() is called without isPresent() check

Enabled

Warning icon Warning

Overwritten Map key or Set element

Enabled

Warning icon Warning

Reference checked for null is not used inside if

Disabled

Warning icon Warning

Reflective access to a source-only annotation

Enabled

Warning icon Warning

Result of method call ignored

Enabled

Warning icon Warning

Result of object allocation ignored

Disabled

Warning icon Warning

Sorted collection with non-comparable elements

Enabled

Warning icon Warning

Statement with empty body

Enabled

Warning icon Warning

Static field referenced via subclass

Disabled

Warning icon Warning

Static method referenced via subclass

Disabled

Warning icon Warning

String.equals() called with CharSequence argument

Enabled

Warning icon Warning

String comparison using ==, instead of equals()

Enabled

Warning icon Warning

String concatenation as argument to MessageFormat.format() call

Disabled

Warning icon Warning

String concatenation as argument to format() call

Disabled

Warning icon Warning

String literal concatenation missing whitespace

Disabled

Warning icon Warning

StringBuilder constructor call with char argument

Enabled

Warning icon Warning

Subtraction in compareTo()

Disabled

Warning icon Warning

Suspicious Collection.toArray() call

Enabled

Warning icon Warning

Suspicious Comparator.compare() implementation

Enabled

Warning icon Warning

Suspicious List.remove() in the loop

Enabled

Warning icon Warning

Suspicious System.arraycopy() call

Enabled

Warning icon Warning

Suspicious Arrays method calls

Enabled

Warning icon Warning

Suspicious array cast

Disabled

Warning icon Warning

Suspicious collections method calls

Enabled

Warning icon Warning

Suspicious indentation after control statement without braces

Disabled

Warning icon Warning

Suspicious integer division assignment

Enabled

Warning icon Warning

Suspicious usage of compare method

Enabled

Warning icon Warning

Suspicious variable/parameter name combination

Enabled

Warning icon Warning

Text label in switch statement

Enabled

Warning icon Warning

Throwable not thrown

Enabled

Warning icon Warning

Unsafe call to Class.newInstance()

Disabled

Warning icon Warning

Unused assignment

Enabled

Warning icon Warning

Use of Properties object as a Hashtable

Disabled

Warning icon Warning

Use of index 0 in JDBC ResultSet

Disabled

Warning icon Warning

Wrong package statement

Enabled

Error icon Error

Properties Files

Inspection name

Default state

Default severity

Invalid property key

Enabled

Error icon Error

Reflective access

Inspection name

Default state

Default severity

MethodHandle/VarHandle type mismatch

Enabled

Warning icon Warning

Non-runtime annotation to be used by reflection

Enabled

Warning icon Warning

Reflective access across modules issues

Enabled

Warning icon Warning

Reflective access to nonexistent/not visible class member

Enabled

Warning icon Warning

Reflective invocation arguments mismatch

Enabled

Warning icon Warning

Resource management

Inspection name

Default state

Default severity

Channel opened but not safely closed

Disabled

Warning icon Warning

Hibernate resource opened but not safely closed

Disabled

Warning icon Warning

I/O resource opened but not safely closed

Disabled

Warning icon Warning

JDBC resource opened but not safely closed

Disabled

Warning icon Warning

JNDI resource opened but not safely closed

Disabled

Warning icon Warning

Socket opened but not safely closed

Disabled

Warning icon Warning

Use of DriverManager to get JDBC connection

Disabled

Warning icon Warning

Security

Inspection name

Default state

Default severity

Access of system properties

Disabled

Warning icon Warning

Call to Connection.prepare*() with non-constant string

Disabled

Warning icon Warning

Call to Runtime.exec() with non-constant string

Disabled

Warning icon Warning

Call to Statement.execute() with non-constant string

Disabled

Warning icon Warning

Call to System.loadLibrary() with non-constant string

Disabled

Warning icon Warning

Call to System.setSecurityManager()

Disabled

Warning icon Warning

ClassLoader instantiation

Disabled

Warning icon Warning

Cloneable class in secure context

Disabled

Warning icon Warning

Custom ClassLoader

Disabled

Warning icon Warning

Custom SecurityManager

Disabled

Warning icon Warning

Design for extension

Disabled

Warning icon Warning

Insecure random number generation

Disabled

Warning icon Warning

Non-static inner class in secure context

Disabled

Warning icon Warning

Non-final clone() in secure context

Disabled

Warning icon Warning

public static array field

Disabled

Warning icon Warning

public static collection field

Disabled

Warning icon Warning

Serializable class in secure context

Disabled

Warning icon Warning

Serialization issues

Inspection name

Default state

Default severity

Comparator class not declared Serializable

Disabled

Warning icon Warning

Externalizable class with readObject() or writeObject()

Disabled

Warning icon Warning

Externalizable class without public no-arg constructor

Enabled

Warning icon Warning

Instance field may not be initialized by readObject()

Disabled

Warning icon Warning

Non-serializable class with readObject() or writeObject()

Disabled

Warning icon Warning

Non-serializable class with serialVersionUID

Disabled

Warning icon Warning

Non-serializable field in a Serializable class

Disabled

Warning icon Warning

Non-serializable object bound to HttpSession

Disabled

Warning icon Warning

Non-serializable object passed to ObjectOutputStream

Disabled

Warning icon Warning

readObject() or writeObject() not declared private

Disabled

Warning icon Warning

readResolve() or writeReplace() not declared protected

Disabled

Warning icon Warning

Serializable class with unconstructable ancestor

Disabled

Warning icon Warning

Serializable class without readObject() and writeObject()

Disabled

Warning icon Warning

Serializable class without serialVersionUID

Disabled

Warning icon Warning

Serializable non-static inner class with non-Serializable outer class

Disabled

Warning icon Warning

Serializable non-static inner class without serialVersionUID

Disabled

Warning icon Warning

Serializable object implicitly stores non-Serializable object

Disabled

Warning icon Warning

serialPersistentFields field not declared private static final ObjectStreamField[]

Disabled

Warning icon Warning

serialVersionUID field not declared private static final long

Disabled

Warning icon Warning

Transient field in non-serializable class

Disabled

Warning icon Warning

Transient field is not initialized on deserialization

Disabled

Warning icon Warning

TestNG

Inspection name

Default state

Default severity

assertEquals() between objects of inconvertible types

Enabled

Warning icon Warning

Constant TestNG assert argument

Disabled

Warning icon Warning

Data provider problems

Enabled

Warning icon Warning

dependsOnMethods problem

Enabled

Warning icon Warning

Duplicated data provider names

Enabled

Error icon Error

Expected exception never thrown in test method body

Disabled

Warning icon Warning

Groups problem

Enabled

Warning icon Warning

Invalid data provider return type

Enabled

Error icon Error

JUnit Test can be converted to TestNG

Disabled

Warning icon Warning

Message missing on TestNG assertion

Disabled

Warning icon Warning

Misordered assertEquals() arguments

Disabled

Warning icon Warning

Old TestNG annotation @Configuration is used

Disabled

Warning icon Warning

Simplifiable TestNG assertion

Enabled

Warning icon Warning

TestNG Javadoc can be converted to annotations

Disabled

Warning icon Warning

Undeclared test

Disabled

Warning icon Warning

Threading issues

Inspection name

Default state

Default severity

Access to static field locked on instance data

Disabled

Warning icon Warning

AtomicFieldUpdater field not declared static final

Enabled

Warning icon Warning

AtomicFieldUpdater issues

Enabled

Warning icon Warning

await() not in loop

Disabled

Warning icon Warning

await() without corresponding signal()

Disabled

Warning icon Warning

Busy wait

Disabled

Warning icon Warning

Call to System.runFinalizersOnExit()

Disabled

Warning icon Warning

Call to Thread.run()

Enabled

Warning icon Warning

Call to Thread.setPriority()

Disabled

Warning icon Warning

Call to Thread.sleep() while synchronized

Disabled

Warning icon Warning

Call to Thread.start() during object construction

Disabled

Warning icon Warning

Call to Thread.stop(), suspend() or resume()

Disabled

Warning icon Warning

Call to Thread.yield()

Disabled

Warning icon Warning

Call to notify() instead of notifyAll()

Disabled

Warning icon Warning

Call to signal() instead of signalAll()

Disabled

Warning icon Warning

Call to a native method while locked

Disabled

Warning icon Warning

Class directly extends java.lang.Thread

Disabled

Warning icon Warning

Double-checked locking

Disabled

Warning icon Warning

Empty synchronized statement

Disabled

Warning icon Warning

Field accessed in both synchronized and unsynchronized contexts

Disabled

Warning icon Warning

Instantiating a Thread with default run() method

Disabled

Warning icon Warning

Lock acquired but not safely unlocked

Disabled

Warning icon Warning

Method with synchronized block could be synchronized method

Disabled

Warning icon Warning

Nested synchronized statement

Disabled

Warning icon Warning

Non-atomic operation on volatile field

Enabled

Warning icon Warning

Non-private field accessed in synchronized context

Disabled

Warning icon Warning

Non thread-safe static field access

Disabled

Warning icon Warning

notify() or notifyAll() called on java.util.concurrent.locks.Condition object

Disabled

Warning icon Warning

notify() or notifyAll() without corresponding state change

Disabled

Warning icon Warning

notify() without corresponding wait()

Disabled

Warning icon Warning

signal() without corresponding await()

Disabled

Warning icon Warning

Static initializer references subclass

Enabled

Warning icon Warning

Synchronization on getClass()

Enabled

Warning icon Warning

Synchronization on static field

Disabled

Warning icon Warning

Synchronization on this

Disabled

Warning icon Warning

Synchronization on a Lock object

Disabled

Warning icon Warning

Synchronization on a non-final field

Enabled

Warning icon Warning

Synchronization on an object initialized with a literal

Disabled

Warning icon Warning

Synchronization on local variable or method parameter

Enabled

Warning icon Warning

synchronized method

Disabled

Warning icon Warning

ThreadLocal field not declared static final

Disabled

Warning icon Warning

ThreadLocalRandom instance might be shared

Disabled

Warning icon Warning

Unconditional wait() call

Disabled

Warning icon Warning

Unsynchronized method overrides synchronized method

Disabled

Warning icon Warning

Volatile array field

Disabled

Warning icon Warning

wait() called on java.util.concurrent.locks.Condition object

Disabled

Warning icon Warning

wait() not in loop

Disabled

Warning icon Warning

wait() or await() without timeout

Disabled

Warning icon Warning

wait() or notify() while not synchronized

Disabled

Warning icon Warning

wait() while holding two locks

Disabled

Warning icon Warning

wait() without corresponding notify()

Disabled

Warning icon Warning

while loop spins on field

Enabled

Warning icon Warning

toString() issues

Inspection name

Default state

Default severity

Class does not override toString() method

Disabled

Warning icon Warning

Field not used in toString() method

Disabled

Warning icon Warning

Verbose or redundant code constructs

Inspection name

Default state

Default severity

Comparator can be simplified

Enabled

Warning icon Warning

Condition is covered by further condition

Enabled

Warning icon Warning

Duplicate branches in switch

Enabled

Weak Warning icon Weak Warning

Excessive lambda usage

Enabled

Warning icon Warning

Excessive range check

Enabled

Warning icon Warning

Explicit array filling

Enabled

Warning icon Warning

Manual min/max calculation

Enabled

Warning icon Warning

Multiple occurrences of the same expression

Enabled

Weak Warning icon Weak Warning

Redundant compare method call

Enabled

Warning icon Warning

Redundant isInstance or cast call

Enabled

Warning icon Warning

Redundant Collection operation

Enabled

Warning icon Warning

Redundant String operation

Enabled

Warning icon Warning

Redundant array creation

Enabled

Warning icon Warning

Redundant type arguments

Enabled

Warning icon Warning

Redundant type cast

Enabled

Warning icon Warning

StringBuilder can be replaced with String

Enabled

Warning icon Warning

Too weak variable type leads to unnecessary cast

Enabled

Warning icon Warning

Unnecessary break statement

Enabled

Warning icon Warning

Unnecessary continue statement

Enabled

Warning icon Warning

Unnecessary default for enum switch statement

Enabled

Warning icon Warning

Unnecessarily escaped character

Enabled

Warning icon Warning

Unnecessary return statement

Enabled

Warning icon Warning

Unnecessary label on break statement

Enabled

Warning icon Warning

Unnecessary label on continue statement

Enabled

Warning icon Warning

Visibility

Inspection name

Default state

Default severity

Access of inherited field looks like access of element in surrounding code

Disabled

Warning icon Warning

Anonymous class variable hides variable in containing method

Disabled

Warning icon Warning

Call to inherited method looks like call to local method

Disabled

Warning icon Warning

Field name hides field in superclass

Disabled

Warning icon Warning

Inner class field hides outer class field

Disabled

Warning icon Warning

Lambda parameter hides field

Disabled

Warning icon Warning

Local variable hides field

Disabled

Warning icon Warning

Method overloads method of superclass

Disabled

Warning icon Warning

Method overrides inaccessible method of superclass

Disabled

Warning icon Warning

Method tries to override static method of superclass

Disabled

Warning icon Warning

Module exports/opens package to itself

Enabled

Warning icon Warning

Non-accessible class is exposed

Enabled

Warning icon Warning

Parameter hides field

Disabled

Warning icon Warning

Type parameter hides visible type

Enabled

Warning icon Warning

Usage of service not declared in module-info

Enabled

Warning icon Warning

Last modified: 19 October 2022