Community
Participate
Working Groups
Build 20020527 When moving a secondary type from one unit to another one, since fix for bug 17807, secondary types are no longer removed early. This now causes in turn issues due to duplicate type unexpected errors. Following script should work: public void testMoveSecondaryType() { IPath projectPath = env.addProject("Project"); env.addExternalJar(projectPath, env.getMinimalJarPath()); // remove old package fragment root so that names don't collide env.removePackageFragmentRoot(projectPath, ""); IPath root = env.addPackageFragmentRoot(projectPath, "src"); env.setOutputFolder(projectPath, "bin"); IPath pathToAA = env.addClass(root, "p", "AA", "package p; \n"+ "public class AA { \n"+ "} \n"+ "class AZ { \n" + "} \n"); IPath pathToAB = env.addClass(root, "p", "AB", "package p; \n"+ "public class AB extends AZ { \n"+ "} \n"); IPath pathToZZ = env.addClass(root, "p", "ZZ", "package p; \n"+ "public class ZZ { \n"+ "} \n"); fullBuild(projectPath); expectingNoProblems(); /* Move AZ from AA to ZZ */ IPath pathToAZ = env.addClass(root, "p", "AA", "package p; \n"+ "public class AA { \n"+ "} \n"+ "class AZ { \n" + "} \n"); pathToZZ = env.addClass(root, "p", "ZZ", "package p; \n"+ "public class ZZ { \n"+ "} \n"+ "class AZ { \n" + "} \n"); incrementalBuild(projectPath); expectingNoProblems(); }
This testcase is busted... there is no problem. It should be: /* Move AZ from AA to ZZ */ IPath pathToAZ = env.addClass(root, "p", "AA", "package p; \n"+ "public class AA { \n"+ "} \n"); pathToZZ = env.addClass(root, "p", "ZZ", "package p; \n"+ "public class ZZ { \n"+ "} \n"+ "class AZ { \n" + "} \n");
Don't know how to verify this.
It was a bug in the testcase.