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 30, 2023
1 parent 05d74bc commit d79197f
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 d79197f

Please sign in to comment.