From 26bf4806f7740683a17514605709ea924c543bb7 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 31 Oct 2024 19:01:15 -0400 Subject: [PATCH] Fix array indexing exception in PushDownRefactoringProcessor (#1759) --- .../refactoring/structure/PushDownRefactoringProcessor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PushDownRefactoringProcessor.java b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PushDownRefactoringProcessor.java index 70e2afb4e5b..dab26048b78 100644 --- a/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PushDownRefactoringProcessor.java +++ b/org.eclipse.jdt.core.manipulation/refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/PushDownRefactoringProcessor.java @@ -791,7 +791,7 @@ public final boolean visit(MethodInvocation node) { ListRewrite args= fRewrite.getListRewrite(node, MethodInvocation.ARGUMENTS_PROPERTY); List originalArgsList= args.getOriginalList(); if (originalArgsList.size() > 0) { - ASTNode argsCopy= typeArgs.createCopyTarget(originalArgsList.get(0), originalArgsList.get(originalTypeList.size() - 1)); + ASTNode argsCopy= typeArgs.createCopyTarget(originalArgsList.get(0), originalArgsList.get(originalArgsList.size() - 1)); superMethodInvocation.arguments().add(argsCopy); } fRewrite.replace(node, superMethodInvocation, null);