diff options
author | Ayushman Jain | 2011-12-14 06:27:12 +0000 |
---|---|---|
committer | Ayushman Jain | 2011-12-14 06:27:12 +0000 |
commit | 626c55af72d40b07c0ba5d8332f9d48da304abca (patch) | |
tree | c41c7890f3dee8fc8097a0bd319d1e4279b41aec | |
parent | 629b451784d7fd4b7e4693f33c18d06efd00c76c (diff) | |
download | eclipse.jdt.core-626c55af72d40b07c0ba5d8332f9d48da304abca.tar.gz eclipse.jdt.core-626c55af72d40b07c0ba5d8332f9d48da304abca.tar.xz eclipse.jdt.core-626c55af72d40b07c0ba5d8332f9d48da304abca.zip |
R3_7_maintenance - Fixed bug 364450: Dubious class path error triggers av20111214-0627
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 7b365431b7..84b904d74d 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 @@ -1053,4 +1053,37 @@ public class IncrementalTests extends BuilderTests { JavaCore.setOptions(options); } } + + // 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$ + } } 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 80692236ed..9bbcd02972 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.B80_R37x, 3.7.2 +compiler.version = 0.B81_R37x, 3.7.2 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 d1054aa313..bf691284ff 100644 --- a/org.eclipse.jdt.core/buildnotes_jdt-core.html +++ b/org.eclipse.jdt.core/buildnotes_jdt-core.html @@ -41,11 +41,24 @@ </td> </tr> </table> +<a name="v_B81_R37x"></a> +<hr><h1> +Eclipse Platform Build Notes<br> +Java development tools core</h1> +Eclipse SDK 3.7.2 - %date% - 3.7.2 +<br>Project org.eclipse.jdt.core v_B81_R37x +(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_B81_R37x">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_B80_R37x"></a> <hr><h1> Eclipse Platform Build Notes<br> Java development tools core</h1> -Eclipse SDK 3.7.2 - November 30, 2011 - 3.7.2 +Eclipse SDK 3.7.2 - November 30, 2011 <br>Project org.eclipse.jdt.core v_B80_R37x (<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_B80_R37x">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 84d3e74d0a..09dee82c3a 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 @@ -1194,7 +1194,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) { |