Skip to content

Commit

Permalink
NoEmptyCollectionWithRawType: Use pattern in UsesField
Browse files Browse the repository at this point in the history
  • Loading branch information
knutwannheden committed Mar 6, 2024
1 parent 8420c57 commit f1672bb
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,7 @@ public Duration getEstimatedEffortPerOccurrence() {

@Override
public TreeVisitor<?, ExecutionContext> getVisitor() {
TreeVisitor<?, ExecutionContext> precondition = Preconditions.or(
new UsesField<>("java.util.Collections", "EMPTY_LIST"),
new UsesField<>("java.util.Collections", "EMPTY_MAP"),
new UsesField<>("java.util.Collections", "EMPTY_SET")
);
return Preconditions.check(precondition, new JavaVisitor<ExecutionContext>() {
return Preconditions.check(new UsesField<>("java.util.Collections", "EMPTY_*"), new JavaVisitor<ExecutionContext>() {
final Map<String, String> updateFields = new HashMap<>();

{
Expand Down

0 comments on commit f1672bb

Please sign in to comment.