Project: JDT
Bug 185694 [introduce parameter object] Introduce Parameter Object substitutes wrong class
Reported: 2007-05-06 12:01:15 | Status: verified fixed

3.3M7 I20070503-1400 public class A { public static void main(String[] args) { method(5, 6); } public static void method(int x, int y) { System.out.println(x + ", " + y); } } Extract a parameter object class Point in a separate CU on x any y and name it point. The result is: public class A { public static void main(String[] args) { method(new Point(5, 6)); } public static void method(java.awt.Point point) { System.out.println(point.x + ", " + point.y); } } The method call no longer matches the signature, which now references java.awt.Point.

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/IntroduceParameterObject/testDefaultPackagePoint/in/TestDefaultPackagePoint.java org.eclipse.jdt.ui.tests.refactoring/resources/IntroduceParameterObject/testDefaultPackagePoint/out/TestDefaultPackagePoint.java org.eclipse.jdt.ui.tests.refactoring/resources/IntroduceParameterObject/testDefaultPackagePointTopLevel/in/TestDefaultPackagePointTopLevel.java org.eclipse.jdt.ui.tests.refactoring/resources/IntroduceParameterObject/testDefaultPackagePointTopLevel/out/ArrayList.java org.eclipse.jdt.ui.tests.refactoring/resources/IntroduceParameterObject/testDefaultPackagePointTopLevel/out/TestDefaultPackagePointTopLevel.java org.eclipse.jdt.ui.tests.refactoring/resources/IntroduceParameterObject/testImportNameSimple/in/TestImportNameSimple.java org.eclipse.jdt.ui.tests.refactoring/resources/IntroduceParameterObject/testImportNameSimple/out/ArrayList.java org.eclipse.jdt.ui.tests.refactoring/resources/IntroduceParameterObject/testImportNameSimple/out/TestImportNameSimple.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceParameterObjectTests.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/ParameterInfo.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ChangeSignatureRefactoring.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/IDefaultValueAdvisor.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/IntroduceParameterObjectRefactoring.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/ParameterObjectFactory.java