Introduce CharSequence
variant of StringIsEmpty
Refaster rule
#1394
Labels
Milestone
CharSequence
variant of StringIsEmpty
Refaster rule
#1394
Problem
Right now
StringRules
is able to do replacements for Strings, but skips StringBuilder for instance, as identified here:There's a note at the top of this recipe that goes into somewhat more detail on what's needed to cover any CharSequence.
error-prone-support/error-prone-contrib/src/main/java/tech/picnic/errorprone/refasterrules/StringRules.java
Lines 31 to 46 in 4b458e0
Description of the proposed new feature
Implement whatever's needed to rewrite any CharSequence, especially since this project now targets Java 17+.
Considerations
If we're to support Java 8-15 still (please do 😇) then any recipe targeting Java 15+
CharSequence.isEmpty()
might need to be in addition to the recipe forString.isEmpty()
, which is still available on older versions of Java, and matches as such.Participation
Would this need anything more than just an additional CharSequenceRule ? Or what approach should be taken here?
The text was updated successfully, but these errors were encountered: