Skip to main content
summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorMichael Keppler2018-07-20 01:47:33 -0400
committerMichael Keppler2018-07-20 01:47:33 -0400
commitc7ddddc3390f9d25c52d03fd75fe059a81e9fd32 (patch)
tree1f7e3c4251405932391b9b8271982fb550c43e27 /build
parent9b2de3ca06eb6a65032c0d76bc9616483ede5bee (diff)
downloadorg.eclipse.cdt-c7ddddc3390f9d25c52d03fd75fe059a81e9fd32.tar.gz
org.eclipse.cdt-c7ddddc3390f9d25c52d03fd75fe059a81e9fd32.tar.xz
org.eclipse.cdt-c7ddddc3390f9d25c52d03fd75fe059a81e9fd32.zip
Bug 537211 - Error running Builtin Specs Detector (closed project)
Just check for the resource being accessible immediately before trying to delete markers of it. Change-Id: Ic359dc5a5a865a981847c6da1dd2e8cc312b3bd9 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuiltinSpecsDetector.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuiltinSpecsDetector.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuiltinSpecsDetector.java
index ca31fcc4d6..db1c5eb75a 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuiltinSpecsDetector.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/language/settings/providers/AbstractBuiltinSpecsDetector.java
@@ -209,6 +209,9 @@ public abstract class AbstractBuiltinSpecsDetector extends AbstractLanguageSetti
* @param rc - resource to check markers.
*/
public void deleteMarkers(IResource rc) {
+ if (!rc.isAccessible()) {
+ return; // resource might be read-only or project might be closed
+ }
String providerId = getId();
try {
IMarker[] markers = rc.findMarkers(SCANNER_DISCOVERY_PROBLEM_MARKER, false, IResource.DEPTH_ZERO);

Back to the top