diff options
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 bf5dedd517..529dae7800 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.981_R35x, 3.5.2 release +compiler.version = 0.982_R35x, 3.5.2 release compiler.copyright = Copyright IBM Corp 2000, 2009. 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 5365e83fd6..a774f6d0ff 100644 --- a/org.eclipse.jdt.core/buildnotes_jdt-core.html +++ b/org.eclipse.jdt.core/buildnotes_jdt-core.html @@ -39,11 +39,24 @@ </td> </tr> </table> +<a name="v_982_R35x"></a> +<hr><h1> +Eclipse Platform Build Notes<br> +Java development tools core</h1> +Eclipse SDK 3.5.2 - %date% - 3.5.2 +<br>Project org.eclipse.jdt.core v_982_R35x +(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_982_R35x">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_981_R35x"></a> <hr><h1> Eclipse Platform Build Notes<br> Java development tools core</h1> -Eclipse SDK 3.5.2 - February 11, 2010 - 3.5.2 +Eclipse SDK 3.5.2 - February 11, 2010 <br>Project org.eclipse.jdt.core v_981_R35x (<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_981_R35x">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 c474c5cd16..95b3870555 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 @@ -1053,7 +1053,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) { |