Skip to content

Commit

Permalink
fix endless loop in RippleMethodFinder2.UnionFind.find(IType) eclipse…
Browse files Browse the repository at this point in the history
  • Loading branch information
EcljpseB0T committed Feb 14, 2024
1 parent b4f395c commit 39c1ec5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ public void init(IType type) {
public IType find(IType element) {
IType root= element;
IType rep= fElementToRepresentative.get(root);
while (rep != null && ! rep.equals(root)) {
Set<IType> visited=new HashSet<>();
while (rep != null && visited.add(root)) {
root= rep;
rep= fElementToRepresentative.get(root);
}
Expand Down

0 comments on commit 39c1ec5

Please sign in to comment.