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
return null;
		IFileEditorInput input= (IFileEditorInput) element;
		ICompilationUnit original= createCompilationUnit(input.getFile());
		if (original == null)
			return null;
		FileInfo info= super.createFileInfo(element);
		if (!(info instanceof CompilationUnitInfo))
			return null;
		CompilationUnitInfo cuInfo= (CompilationUnitInfo) info;
		setUpSynchronization(cuInfo);
		IProblemRequestor requestor= cuInfo.fModel instanceof IProblemRequestor ? (IProblemRequestor) cuInfo.fModel : null;
		if (requestor instanceof IProblemRequestorExtension) {
			IProblemRequestorExtension extension= (IProblemRequestorExtension) requestor;
			extension.setIsActive(false);
			extension.setIsHandlingTemporaryProblems(isHandlingTemporaryProblems());
		}
		original.becomeWorkingCopy(requestor, getProgressMonitor());
		cuInfo.fCopy= original;
		if (cuInfo.fModel instanceof CompilationUnitAnnotationModel)   {
			CompilationUnitAnnotationModel model= (CompilationUnitAnnotationModel) cuInfo.fModel;
			model.setCompilationUnit(cuInfo.fCopy);
		}
		if (cuInfo.fModel != null)
			cuInfo.fModel.addAnnotationModelListener(fGlobalAnnotationModelListener);
		return cuInfo;
	}
    private void setUpSynchronization(CompilationUnitInfo cuInfo) {
        IDocument document= cuInfo.fTextFileBuffer.getDocument();
        IAnnotationModel model= cuInfo.fModel;
        if (document instanceof ISynchronizable && model instanceof ISynchronizable) {