Code Maturity problems

Lint4j checks for calls to the following methods that are used to debug problems during the test phase of a software. These calls are typically removed before the release, but it is easy to forget one.

Call to java.lang.Throwable.printStackTrace or java.lang.Thread.dumpStack

These debug statements should be removed or replaced with a better suited logging mechanism.

Solution: remove in a production environment

Severity level: 4

Using System.err or System.out

Using System.err or System.out indicate possible debug code and should be removed or replaced with a better suited logging mechanism.

Solution: remove in a production environment

Severity level: 4

Using Vector or Hashtable

These two classes have been superceeded by the Collections classes. In addition, Vector and Hashtable are synchronized, and may introduce scalability problems when used in a static context.

Solution: replace Vector with ArrayList, and Hashtable with HashMap, or a more suitable collection

Severity level: 3

Empty blocks in try/finally/if/for/while/do/synchronized constructs

Empty blocks in try, finally, if, for, while, while, or synchronized constructs indicate immature code (e.g. a piece of code that has been commented out) with a negative performance impact.

Solution: ensure that code hasn't been accidentally commented out.

Severity level: 3