Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/IncrementalImageBuilder.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/IncrementalImageBuilder.java b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/IncrementalImageBuilder.java
index 7844e0a50f..f4b786b704 100644
--- a/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/IncrementalImageBuilder.java
+++ b/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/builder/IncrementalImageBuilder.java
@@ -956,6 +956,15 @@ protected boolean writeClassFileCheck(IFile file, String fileName, byte[] newByt
addDependentsOf(new Path(fileName), true);
this.newState.wasStructurallyChanged(fileName);
}
+ } catch (JavaModelException jme) {
+ Throwable e = jme.getCause();
+ if (e instanceof CoreException) {
+ // assuming a ResourceException during IFile.getContents(), treat it like a corrupt file
+ addDependentsOf(new Path(fileName), true);
+ this.newState.wasStructurallyChanged(fileName);
+ } else {
+ throw jme;
+ }
} catch (ClassFormatException e) {
addDependentsOf(new Path(fileName), true);
this.newState.wasStructurallyChanged(fileName);

Back to the top