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 new SubProgressMonitor(monitor, ticks, SubProgressMonitor.PREPEND_MAIN_LABEL_TO_SUBTASK);
		return new NullProgressMonitor();
	}
	protected void commitWorkingCopy(IProgressMonitor monitor, Object element, CompilationUnitInfo info, boolean overwrite) throws CoreException {
		if (monitor == null)
			monitor= new NullProgressMonitor();
		monitor.beginTask("", 100); 
		try {
			IProgressMonitor subMonitor= getSubProgressMonitor(monitor, 50);
			try {
				synchronized (info.fCopy) {
					info.fCopy.reconcile(ICompilationUnit.NO_AST, false, null, subMonitor);
				}
			} catch (JavaModelException ex) {
				
			} finally {
				subMonitor.done();
			}
			IDocument document= info.fTextFileBuffer.getDocument();
			IResource resource= info.fCopy.getResource();
			Assert.isTrue(resource instanceof IFile);
			if (!resource.exists()) {
				
				subMonitor= getSubProgressMonitor(monitor, 50);
				try {
					createFileFromDocument(subMonitor, (IFile) resource, document);
				} finally {
					subMonitor.done();
				}
				return;