Project: JDT
Bug 51160 IllegalArgumentException inlining method
Reported: 2004-02-04 10:00:36 | Status: verified fixed

Build 20040203 Got the following IllegalArgumentException attempting to show the preview of an inline method refactoring: Caused by: java.lang.IllegalArgumentException at org.eclipse.jdt.core.dom.ASTNode.checkNewChild(ASTNode.java:1101) at org.eclipse.jdt.core.dom.ASTNode$NodeList.add(ASTNode.java:828) at org.eclipse.jdt.internal.corext.refactoring.code.CallInliner.addNewLocals (CallInliner.java:518) at org.eclipse.jdt.internal.corext.refactoring.code.CallInliner.perform (CallInliner.java:448) at org.eclipse.jdt.internal.corext.refactoring.code.InlineMethodRefactoring.checkIn put(InlineMethodRefactoring.java:229) at org.eclipse.jdt.internal.ui.refactoring.CheckConditionsOperation.run (CheckConditionsOperation.java:64) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:99) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:101) Apparently, the child that is being added already has a parent.

Files changed in fix:
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/CallInliner.java