diff options
author | Ayushman Jain | 2011-12-14 11:42:33 +0000 |
---|---|---|
committer | Ayushman Jain | 2011-12-14 11:42:33 +0000 |
commit | c251eb3f1fc1878627fdc704bb1636e70f3db615 (patch) | |
tree | 8210fabcb40071085c59ee56234f45adbae683c2 | |
parent | ffe2a8dc184b59e3c0adb672dee3b13246f072a9 (diff) | |
download | eclipse.jdt.core-c251eb3f1fc1878627fdc704bb1636e70f3db615.tar.gz eclipse.jdt.core-c251eb3f1fc1878627fdc704bb1636e70f3db615.tar.xz eclipse.jdt.core-c251eb3f1fc1878627fdc704bb1636e70f3db615.zip |
R3_6_maintenance - Fixed bug 364450: Dubious class path error triggers a
full rebuild
4 files changed, 55 insertions, 3 deletions
diff --git a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/IncrementalTests.java b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/IncrementalTests.java index 436177ebaf..ca5d63db4c 100644 --- a/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/IncrementalTests.java +++ b/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/IncrementalTests.java @@ -782,6 +782,39 @@ public class IncrementalTests extends BuilderTests { org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.MAX_AT_ONCE = max; } } + + // https://bugs.eclipse.org/bugs/show_bug.cgi?id=364450 + // Incremental build should not generate buildpath error + // NOT generated by full build. + public void testBug364450() throws JavaModelException { + IPath projectPath = env.addProject("Project"); //$NON-NLS-1$ + env.addExternalJars(projectPath, Util.getJavaClassLibs()); + env.setOutputFolder(projectPath, "bin"); //$NON-NLS-1$ + + IPath wPath = env.addClass(projectPath, "w", "W", //$NON-NLS-1$ //$NON-NLS-2$ + "package w;\n" + + "public class W {\n" + + " private w.I i;}"); //$NON-NLS-1$ + + IPath aPath = env.addClass(projectPath, "a", "A", //$NON-NLS-1$ //$NON-NLS-2$ + "package a;\n" + + "import w.I;\n" + + "import w.W;\n" + + "public class A {}"); //$NON-NLS-1$ + + fullBuild(projectPath); + expectingSpecificProblemFor(wPath, new Problem("W", "w.I cannot be resolved to a type", wPath, 37, 40, CategorizedProblem.CAT_TYPE, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ + expectingSpecificProblemFor(aPath, new Problem("A", "The import w.I cannot be resolved", aPath, 18, 21, CategorizedProblem.CAT_IMPORT, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ + + aPath = env.addClass(projectPath, "a", "A", //$NON-NLS-1$ //$NON-NLS-2$ + "package a;\n" + + "import w.I;\n" + + "import w.W;\n" + + "public class A {}"); //$NON-NLS-1$ + + incrementalBuild(projectPath); + expectingSpecificProblemFor(aPath, new Problem("A", "The import w.I cannot be resolved", aPath, 18, 21, CategorizedProblem.CAT_IMPORT, IMarker.SEVERITY_ERROR)); //$NON-NLS-1$ //$NON-NLS-2$ + } public void test129316() throws JavaModelException { diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties index 73995c88e0..a2a1d5e4a1 100644 --- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties +++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/messages.properties @@ -15,7 +15,7 @@ #Format: compiler.name = word1 word2 word3 compiler.name = Eclipse Compiler for Java(TM) #Format: compiler.version = 0.XXX[, other words (don't forget the comma if adding other words)] -compiler.version = 0.A79_R36x, 3.6.4 +compiler.version = 0.A80_R36x, 3.6.4 compiler.copyright = Copyright IBM Corp 2000, 2011. All rights reserved. ### progress diff --git a/org.eclipse.jdt.core/buildnotes_jdt-core.html b/org.eclipse.jdt.core/buildnotes_jdt-core.html index f6a4424dda..2ee38fe1f4 100644 --- a/org.eclipse.jdt.core/buildnotes_jdt-core.html +++ b/org.eclipse.jdt.core/buildnotes_jdt-core.html @@ -40,11 +40,24 @@ </td> </tr> </table> +<a name="v_A80_R36x"></a> +<hr><h1> +Eclipse Platform Build Notes<br> +Java development tools core</h1> +Eclipse SDK 3.6.4 - %date% - 3.6.4 +<br>Project org.eclipse.jdt.core v_A80_R36x +(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A80_R36x">cvs</a>). +<h2>What's new in this drop</h2> + +<h3>Problem Reports Fixed</h3> +<a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=364450">364450</a> +Dubious class path error triggers a full rebuild + <a name="v_A79_R36x"></a> <hr><h1> Eclipse Platform Build Notes<br> Java development tools core</h1> -Eclipse SDK 3.6.4 - October 21, 2011 - 3.6.4 +Eclipse SDK 3.6.4 - October 21, 2011 <br>Project org.eclipse.jdt.core v_A79_R36x (<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_A79_R36x">cvs</a>). <h2>What's new in this drop</h2> diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java index 042c2d8cee..0df7d379cd 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/LookupEnvironment.java @@ -1102,7 +1102,13 @@ private ReferenceBinding getTypeFromCompoundName(char[][] compoundName, boolean packageBinding.addType(binding); } else if (binding == TheNotFoundType) { // report the missing class file first - this.problemReporter.isClassPathCorrect(compoundName, this.unitBeingCompleted, this.missingClassFileLocation); + if (!wasMissingType) { + /* Since missing types have been already been complained against while producing binaries, there is no class path + * misconfiguration now that did not also exist in some equivalent form while producing the class files which encode + * these missing types. So no need to bark again. Note that wasMissingType == true signals a type referenced in a .class + * file which could not be found when the binary was produced. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=364450 */ + this.problemReporter.isClassPathCorrect(compoundName, this.unitBeingCompleted, this.missingClassFileLocation); + } // create a proxy for the missing BinaryType binding = createMissingType(null, compoundName); } else if (!isParameterized) { |