1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

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
This commit is contained in:
Doug Schaefer 2018-07-04 10:49:47 -04:00
parent 4b8274b9a1
commit a1ed9cdb39

View file

@ -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();
}