Bug 97402 Save Failed: org.eclipse.jdt.internal.compiler.ast.LocalDeclaration
Version: 3.1.0 Build id: I20050527-1300 (RC1) Steps to reproduce: 1.) Have a Class Foo like this: public class Foo { private static void foo() { @interface Bar { public String bar = "Hu"; } } } 2.) Save Actual Results: Error Dialog showing with the message: Save Failed: org.eclipse.jdt.internal.compiler.ast.LocalDeclaration Expected Results: No error Dialog Regards, Ben
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/CompilationUnitDocumentProvider.java
public static final String SPELLING_ANNOTATION_TYPE= "org.eclipse.ui.workbench.texteditor.spelling"; 
			
			/**
			 * The layer in which task problem annotations are located.
			 */
			private static final int TASK_LAYER;
			/**
			 * The layer in which info problem annotations are located.
			 */
			private static final int INFO_LAYER;
			/**
			 * The layer in which warning problem annotations representing are located.
			 */
			private static final int WARNING_LAYER;
			/**
			 * The layer in which error problem annotations representing are located.
			 */
			private static final int ERROR_LAYER;
			static {
				AnnotationPreferenceLookup lookup= EditorsUI.getAnnotationPreferenceLookup();
				TASK_LAYER= computeLayer("org.eclipse.ui.workbench.texteditor.task", lookup); 
				INFO_LAYER= computeLayer("org.eclipse.jdt.ui.info", lookup); 
				WARNING_LAYER= computeLayer("org.eclipse.jdt.ui.warning", lookup); 
				ERROR_LAYER= computeLayer("org.eclipse.jdt.ui.error", lookup); 
			}
			private static int computeLayer(String annotationType, AnnotationPreferenceLookup lookup) {
				Annotation annotation= new Annotation(annotationType, false, null);
				AnnotationPreference preference= lookup.getAnnotationPreference(annotation);
				if (preference != null)