Skip to content

Commit

Permalink
Add workaround for Platform log can throw NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
laeubi committed Jul 31, 2023
1 parent 0ffb59a commit 7261716
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,14 @@ private static Jar getCachedJar(Path cacheFile, Path sourceFile) {
return new Jar(cacheFile.toFile());
}
} catch (IOException e) {
// if any I/O error occurs we assume we need to regenerate the data...
Platform.getLog(MavenBundleWrapper.class)
.error("Reading cached data for " + cacheFile + " failed, will regenerate the data ...", e);
try {
// if any I/O error occurs we assume we need to regenerate the data...
Platform.getLog(MavenBundleWrapper.class)
.error("Reading cached data for " + cacheFile + " failed, will regenerate the data ...", e);
} catch (RuntimeException rte) {
//WORKAROUND FOR https://github.com/eclipse-platform/eclipse.platform/pull/521
System.err.println("Reading cached data for " + cacheFile + " failed, will regenerate the data ...");
}
}
return null;
}
Expand Down

0 comments on commit 7261716

Please sign in to comment.