Open Luro02 opened 1 month ago
Detects CtBinaryExpression<Boolean> that can be replaced by a call to Character.isLetterOrDigit().
CtBinaryExpression<Boolean>
Character.isLetterOrDigit()
The implementation is easy, visit all CtBinaryExpression and check that they match the below format.
CtBinaryExpression
CHAR_LETTER_OR_DIGIT
api
Character.isLetter(c) || Character.isDigit(c)
Could be written as:
Character.isLetterOrDigit(c)
!(Character.isLetter(c) || Character.isDigit(c)) // or !Character.isLetter(c) && !Character.isDigit(c)
!Character.isLetterOrDigit(c)
What it does
Detects
CtBinaryExpression<Boolean>
that can be replaced by a call toCharacter.isLetterOrDigit()
.The implementation is easy, visit all
CtBinaryExpression
and check that they match the below format.Lint Name
CHAR_LETTER_OR_DIGIT
Category
api
Example
Could be written as:
Could be written as: