Suggest SomeListing.of(1, 2, 6, ...).contains(c)
in place of c == 1 || c == 2 || c == 6 ....
#555
Labels
Milestone
What it does
Simplifies complex boolean expressions into shorter ones that are easier to read.
Some things to be careful of:
X
elements in the resulting list (maybeX=3
?)java.util
import in the model (so list can be used)List
, one could useSet
insteadnull
likea == null || a == 1 || a == 2
Lint Name
USE_LISTING_CONTAINS
Category
complexity
Example
Could be written as:
The text was updated successfully, but these errors were encountered: