in src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCache.java [201:218]
private Val readFile(Path path) {
if (path.toFile().exists()) {
try (InputStream fileStream = Files.newInputStream(path);
ObjectInputStream objStream = new ObjectInputStream(fileStream)) {
return (Val) objStream.readObject();
} catch (ClassNotFoundException e) {
log.atWarning().log(
"Entry %s in cache %s has an incompatible class and can't be"
+ " deserialized. Invalidating entry.",
path, websessionsDir);
log.atFine().withCause(e).log(e.getMessage());
invalidate(path.getFileName().toString());
} catch (IOException e) {
log.atWarning().withCause(e).log("Cannot read cache %s", websessionsDir);
}
}
return null;
}