Skip to content

Commit

Permalink
Don't redeclare EnumSet as Set (#183)
Browse files Browse the repository at this point in the history
* Don't redeclare EnumSet as Set

That changes the type of the generic, potentially breaking iterators.

Fixes #179

* Update src/test/java/org/openrewrite/staticanalysis/UseCollectionInterfacesTest.java

---------

Co-authored-by: Tim te Beek <[email protected]>
  • Loading branch information
Bananeweizen and timtebeek authored Oct 2, 2023
1 parent 2e3a961 commit 9e9b5dc
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 76 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ public Duration getEstimatedEffortPerOccurrence() {
rspecRulesReplaceTypeMap.put("java.util.concurrent.ConcurrentLinkedQueue", "java.util.Queue");
// Set
rspecRulesReplaceTypeMap.put("java.util.AbstractSet", "java.util.Set");
rspecRulesReplaceTypeMap.put("java.util.EnumSet", "java.util.Set");
rspecRulesReplaceTypeMap.put("java.util.HashSet", "java.util.Set");
rspecRulesReplaceTypeMap.put("java.util.LinkedHashSet", "java.util.Set");
rspecRulesReplaceTypeMap.put("java.util.concurrent.CopyOnWriteArraySet", "java.util.Set");
Expand Down
Loading

0 comments on commit 9e9b5dc

Please sign in to comment.