Programming Search⌘K

Java lints, page 3 of 4

The lint rules of Java, with what each one finds. This page has 654 cards.

"A test parameter with only a single value can be a local variable in the test method. You may prefer to leave it as it is, if you expect there will be further values later, or if you want to preserve a format similar to other test methods in this class. SingleValueTestParameter

It is an experimental check, so Error Prone does not turn it on by default.

Code
SingleValueTestParameter
Severity
suggestion

Source: errorprone.info, errorprone.info. JSON record. This entry is a card. Help write this page.

Base exception classes should be treated as abstract. If the exception is intended to be caught, throw a domain-specific exception. Otherwise, prefer a more specific exception for clarity. Common alternatives include: AssertionError, IllegalArgumentException, IllegalStateException, and (Guava's) VerifyException. ThrowSpecificExceptions

It is an experimental check, so Error Prone does not turn it on by default.

Code
ThrowSpecificExceptions
Severity
warning

Source: errorprone.info, errorprone.info. JSON record. This entry is a card. Help write this page.