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.11.1

Updated on

Jun 3, 2022

Issues

301

Read full documentation

Sample configuration


version = 1

[[analyzers]]
name = "java"
enabled = true

  [analyzers.meta]
  runtime_version = 8

Stats


Anti-pattern

67

Bug risk

151

Performance

31

Security

51

Style

1

Issues


View all
Method attempts to access a result set field with index 0JAVA-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 argumentJAVA-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 usedJAVA-E0394
Bug risk

Invalid regex strings will throw a PatternSyntaxException at runtime.

C style array declaration syntax must not be usedJAVA-C1000
Style

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

`Thread` with empty `run` method is uselessJAVA-W0084
Anti-pattern

A thread was created using the default empty run method.