### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core.tests.builder Index: src/org/eclipse/jdt/core/tests/builder/AnnotationDependencyTests.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.builder/src/org/eclipse/jdt/core/tests/builder/AnnotationDependencyTests.java,v retrieving revision 1.1 diff -u -r1.1 AnnotationDependencyTests.java --- src/org/eclipse/jdt/core/tests/builder/AnnotationDependencyTests.java 7 Jan 2009 17:32:30 -0000 1.1 +++ src/org/eclipse/jdt/core/tests/builder/AnnotationDependencyTests.java 12 Jan 2009 18:34:47 -0000 @@ -12,7 +12,9 @@ import junit.framework.Test; +import org.eclipse.core.resources.IMarker; import org.eclipse.core.runtime.IPath; +import org.eclipse.jdt.core.compiler.CategorizedProblem; import org.eclipse.jdt.core.tests.util.Util; /** @@ -239,5 +241,28 @@ // verify that B was not recompiled expectingUniqueCompiledClasses(new String[] { "p1.A" }); } - + + // https://bugs.eclipse.org/bugs/show_bug.cgi?id=214948 + public void testPackageInfoDependency() throws Exception { + String notypes = "@question.SimpleAnnotation(\"foo\") package notypes;"; + String question = "package question;"; + String deprecatedQuestion = "@Deprecated package question;"; + String SimpleAnnotation = "package question; " + "\n" + + "public @interface SimpleAnnotation { String value(); }"; + + IPath notypesPath = env.addClass( this.srcRoot, "notypes", "package-info", notypes ); + env.addClass( this.srcRoot, "question", "package-info", question ); + env.addClass( this.srcRoot, "question", "SimpleAnnotation", SimpleAnnotation ); + + fullBuild( this.projectPath ); + expectingNoProblems(); + + env.addClass( this.srcRoot, "question", "package-info", deprecatedQuestion ); + incrementalBuild( this.projectPath ); + expectingOnlySpecificProblemFor(notypesPath, new Problem("", "The type SimpleAnnotation is deprecated", notypesPath, 1, 26, CategorizedProblem.CAT_DEPRECATION, IMarker.SEVERITY_WARNING)); //$NON-NLS-1$ + + env.addClass( this.srcRoot, "question", "package-info", question ); + incrementalBuild( this.projectPath ); + expectingNoProblems(); + } }