Info

Showing all detectors for the Java language with info severity.

Mandatory method not called after object creation

Mandatory methods must be called after object creation.

Missing timeout check on ExecutorService.awaitTermination

Missing timeout checks on awaitTermination might make the code harder to debug.

Missing check on the result of createNewFile

Missing check on the result of createNewFile might cause data loss.

Missing statement to record cause of InvocationTargetException

Missing statements to record the underlying cause of InvocationTargetException.

Do not catch and throw exception

Do not catch and throw the same exception.

Improperly formatted string arguments

Format strings appropriately for their argument types. For example, use %d, not %s, for integers.

Improper service shutdown

Sudden service shutdown might prevent a graceful termination of threads.

Region specification missing from AWS client initialization

Set an explicit AWS Region to avoid cold start delays in AWS client initialization.

Client constructor deprecation

Client constructors are now deprecated in favor of using builders to create the client.

Manual pagination

Suggest using auto-pagination instead of manual pagination.

Missing check on method output

Missing checks might cause silent failures that are harder to debug.

Batch operations preferred over looping

Batch operations are more efficient than looping to process several items at the same time.

Amazon SQS message visibility changed without a status check

When you change Amazon SQS message visibility, check for MessageNotInFlight exceptions.

Use Stream::anyMatch instead of Stream::findFirst or Stream::findAny

Using Stream::anyMatch is more readable and convenient than using a chain of Stream::filter, Stream::findFirst or Stream::findAny and Optional::isPresent.