DeepSource
Dashboard Resources Pricing Discover Directory Log in

Run your first analysis.

Find thousands of code security and quality issues in your codebase, before they end up in production.

Start now
All analyzers Java
Java

Java

Use Analyzer
Docs
Discuss

Categories

Programming language

Latest version

v0.55.2

Updated on

Mar 30, 2023

Issues

394

Read full documentation

Sample configuration


version = 1

[[analyzers]]
name = "java"

  [analyzers.meta]
  runtime_version = 11
  skip_doc_coverage = [ "nonpublic" ]

Stats


Anti-pattern

104

Bug risk

179

Documentation

8

Performance

33

Security

66

Style

4

Issues


View all
Method attempts to access a result set field with index 0 JAVA-E0343
Bug risk

A call to a getXXX or updateXXX method of a result set was made where the field index is 0. As ResultSet fields start at index 1, this is always a mistake.

Inefficient use of toArray with non-zero sized array argument JAVA-P0335
Performance

This method uses toArray with a non-zero sized array argument. This is less efficient than passing a zero-sized array.

Invalid regex syntax must not be used JAVA-E0394
Bug risk

Invalid regex strings will throw a PatternSyntaxException at runtime.

C style array declaration syntax must not be used JAVA-C1000
Style

Java arrays should not be declared using C-style array declaration syntax.

Thread with empty run method is useless JAVA-W0084
Anti-pattern

A thread was created using the default empty run method.