Skip to content

Commit

Permalink
Loop over entrySet
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Jan 23, 2025
1 parent 607c079 commit 0de9e43
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,18 @@ public TreeVisitor<?, ExecutionContext> getVisitor(Accumulator acc) {
JavaVisitor<ExecutionContext> tableRowVisitor = new JavaVisitor<ExecutionContext>() {
@Override
public J visitMethodDeclaration(J.MethodDeclaration methodDeclaration, ExecutionContext ctx) {
for (UnitTest unitTest : acc.unitTestAndTheirMethods.keySet()) {
for (J.MethodInvocation method : acc.unitTestAndTheirMethods.get(unitTest)) {
for (Map.Entry<UnitTest, Set<J.MethodInvocation>> entry : acc.unitTestAndTheirMethods.entrySet()) {
for (J.MethodInvocation method : entry.getValue()) {
if (method.getSimpleName().equals(methodDeclaration.getSimpleName())) {
unitTestTable.insertRow(ctx, new FindUnitTestTable.Row(
methodDeclaration.getName().toString(),
methodDeclaration.getSimpleName(),
method.printTrimmed(getCursor()),
unitTest.getClazz(),
unitTest.getUnitTestName()
entry.getKey().getClazz(),
entry.getKey().getUnitTestName()
));
}
}
return super.visitMethodDeclaration(methodDeclaration, ctx);
}
return super.visitMethodDeclaration(methodDeclaration, ctx);
}
Expand Down

0 comments on commit 0de9e43

Please sign in to comment.