Explore

Filters (0) Clear filters
Languages
Level
Tags

76-100 of 300

Do not compare classes/types by their name (literal)

Comparing the class names is less robust than comparing the actual classes

  • warning
  • java
  • Java basic
  • SEI CERT
  • quality
  • security
Do not compare classes/types by their name (literal inverted)

Comparing the class names is less robust than comparing the actual classes

  • warning
  • java
  • Java basic
  • SEI CERT
  • quality
  • security
Do not expose internal array

Do not expose an internal array as it is mutable

  • warning
  • java
  • security
  • Java basic
  • quality
Exception: Created but not thrown

Exceptions should be thrown, not just created

  • warning
  • java
  • Java basic
  • quality
Field injection is not recommended

Field injection is not recommended, because the list of required dependencies are unclear during instance creation. This makes testing more difficult and could lead to runtime exceptions when the bean is instantiated without spring.

  • info
  • java
  • kotlin
  • Spring
  • Spring Core
  • dependency injection
  • framework specific
  • quality
Field injection is not recommended (lombok)

Field injection is not recommended, because the list of required dependencies are unclear during instance creation. This makes testing more difficult and could lead to runtime exceptions when the bean is instantiated without spring.

  • info
  • java
  • kotlin
  • Spring
  • Spring Core
  • dependency injection
  • framework specific
  • Lombok
  • quality
Guice Injected Field Not Public

If the Injected field is not public then the code might not be wired up.

  • warning
  • java
  • Guice
  • dependency injection
  • framework specific
  • quality
Incorrect equality check of wrapper values (equals)

Use equals method to compare wrapped values

  • error
  • java
  • Java basic
  • quality
  • SEI CERT
Incorrect equality check of wrapper values (not equals)

Use equals method to compare wrapped values

  • error
  • java
  • Java basic
  • quality
  • SEI CERT
Incorrect use of Objects.equals

Comparing a non-unboxable object and a primitive will always return false

  • warning
  • java
  • Java basic
  • quality
Inefficient use of String.indexOf

Inefficient use of String.indexOf

  • warning
  • java
  • Java basic
  • quality
Invalid comparison of String to number primitive

This comparison of a String to a number will always return false

  • error
  • java
  • Java basic
  • quality
Invalid comparison of String to number wrapper

This comparison of a String to a number will always return false

  • error
  • java
  • Java basic
  • quality
JUnit 4: assertEquals suspicious order of arguments (with message)

Suspicious argument values for 'expected' and 'actual'

  • warning
  • java
  • testing
  • framework specific
  • JUnit 4
  • quality
JUnit 4: assertEquals suspicious order of arguments (with message)

Suspicious argument values for 'expected' and 'actual'

  • warning
  • java
  • testing
  • framework specific
  • JUnit 4
  • quality
JUnit 4: @Ignored Description

Add a description to indicate why the test has been ignored.

  • warning
  • java
  • testing
  • framework specific
  • JUnit 4
  • quality
JUnit 4: Incorrect method signature for annotation

The annotations on this method require it to have a void return type and not be private.

  • error
  • java
  • kotlin
  • testing
  • framework specific
  • JUnit 4
  • quality
JUnit 4: Incorrect method signature for annotation (Class)

The annotations on this method require it to have a void return type, not be private, and be static.

  • error
  • java
  • kotlin
  • testing
  • framework specific
  • JUnit 4
  • quality
JUnit 4: Incorrect method signature for annotation (Class - arguments)

The annotations on this method require it to have no arguments.

  • error
  • java
  • testing
  • framework specific
  • JUnit 4
  • quality
JUnit 4: @Test annotation missing

Method with assertions is missing @Test annotation

  • error
  • java
  • testing
  • framework specific
  • JUnit 4
  • quality
JUnit 5: assertEquals suspicious order of arguments

Suspicious argument values for 'expected' and 'actual'

  • warning
  • java
  • testing
  • framework specific
  • JUnit 5
  • quality
JUnit 5: assertEquals suspicious order of arguments (with message)

Suspicious argument values for 'expected' and 'actual'

  • warning
  • java
  • testing
  • framework specific
  • JUnit 5
  • quality
JUnit 5: @Disabled Description

Add a description to indicate why the test has been disabled.

  • warning
  • java
  • testing
  • framework specific
  • JUnit 5
  • quality
JUnit 5: Incorrect method signature for annotation (All)

The annotations on this method require it to have a void return type, not be private, and be static.

  • error
  • java
  • kotlin
  • testing
  • framework specific
  • JUnit 5
  • quality
JUnit 5: Incorrect method signature for annotation (Each)

The annotations on this method require it to have a void return type, not be private, and not be static.

  • error
  • java
  • kotlin
  • testing
  • framework specific
  • JUnit 5
  • quality