Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Schaefer2018-07-04 14:49:47 +0000
committerDoug Schaefer2018-07-04 14:49:47 +0000
commita1ed9cdb397468e428c81342cd99c547352e8f57 (patch)
tree7b0e3d5c780c46cb8c5d1e52659ddea8d0375ca1
parent4b8274b9a1a80231ae4d4f848693da79b3241157 (diff)
downloadorg.eclipse.cdt-a1ed9cdb397468e428c81342cd99c547352e8f57.tar.gz
org.eclipse.cdt-a1ed9cdb397468e428c81342cd99c547352e8f57.tar.xz
org.eclipse.cdt-a1ed9cdb397468e428c81342cd99c547352e8f57.zip
Bug 536396 - Handle corrupt scanner info cache files
We were not handling JSON parse errors when loading the scanner info cache files which causes havoc at index time. Change-Id: I3a4ee6424134fe756543e4429e9e97b911cda99e
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java
index bc2e24cd2e7..7adcdb15611 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/build/CBuildConfiguration.java
@@ -701,7 +701,7 @@ public abstract class CBuildConfiguration extends PlatformObject
new IExtendedScannerInfoCreator());
Gson gson = gsonBuilder.create();
scannerInfoCache = gson.fromJson(reader, ScannerInfoCache.class);
- } catch (IOException e) {
+ } catch (IOException | JsonParseException e) {
CCorePlugin.log(e);
scannerInfoCache = new ScannerInfoCache();
}

Back to the top