From 4e60dfafb44ec4f9476a3e661a730112e7a4f6d3 Mon Sep 17 00:00:00 2001 From: Carsten Hammer Date: Wed, 9 Oct 2024 19:30:03 +0200 Subject: [PATCH] fix tests --- .../org/eclipse/jdt/internal/common/ASTProcessor.java | 10 ++++++++-- .../org/eclipse/jdt/internal/common/HelperVisitor.java | 4 +++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/ASTProcessor.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/ASTProcessor.java index 67c34774ff1..088c734ceea 100644 --- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/ASTProcessor.java +++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/ASTProcessor.java @@ -13,8 +13,10 @@ *******************************************************************************/ package org.eclipse.jdt.internal.common; +import java.util.AbstractMap; import java.util.LinkedHashMap; import java.util.LinkedList; +import java.util.Map; import java.util.Set; import java.util.function.BiPredicate; import java.util.function.Function; @@ -1197,7 +1199,9 @@ public ASTProcessor callMethodInvocationVisitor( */ public ASTProcessor callMethodInvocationVisitor(String methodname, BiPredicate bs) { - nodetypelist.put(VisitorEnum.MethodInvocation, new NodeHolder(bs, null, methodname)); + nodetypelist.put(VisitorEnum.MethodInvocation, new NodeHolder(bs, null, Map.ofEntries( + new AbstractMap.SimpleEntry<>(HelperVisitor.METHODNAME, methodname) + ))); return this; } @@ -1209,7 +1213,9 @@ public ASTProcessor callMethodInvocationVisitor(String methodname, */ public ASTProcessor callMethodInvocationVisitor(String methodname, BiPredicate bs, Function navigate) { - nodetypelist.put(VisitorEnum.MethodInvocation, new NodeHolder(bs, navigate, methodname)); + nodetypelist.put(VisitorEnum.MethodInvocation, new NodeHolder(bs, navigate, Map.ofEntries( + new AbstractMap.SimpleEntry<>(HelperVisitor.METHODNAME, methodname) + ))); return this; } diff --git a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/HelperVisitor.java b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/HelperVisitor.java index 269eb1a1562..71812422892 100644 --- a/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/HelperVisitor.java +++ b/org.eclipse.jdt.core.manipulation/common/org/eclipse/jdt/internal/common/HelperVisitor.java @@ -737,7 +737,9 @@ public BiPredicate addMethodInvocation(BiPredicate addMethodInvocation(String methodname, BiPredicate bs) { - this.predicatedata.put(VisitorEnum.MethodInvocation, methodname); + this.predicatedata.put(VisitorEnum.MethodInvocation, Map.ofEntries( + new AbstractMap.SimpleEntry<>(METHODNAME, methodname) + )); return predicatemap.put(VisitorEnum.MethodInvocation, bs); }