Fix the error prone error about flogger arguments
The following error gets fixed:
error: [FloggerLogString] Arguments to log(String) must be compile-time constants or parameters annotated with @CompileTimeConstant. If possible, use Flogger's formatting log methods instead.
log.atFine().withCause(e).log(e.getMessage());
^
Change-Id: I35e0c90213de8474f4f4bbe9b33572dcb159d126
diff --git a/src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCache.java b/src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCache.java
index b467614..0c52ce6 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCache.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/websession/flatfile/FlatFileWebSessionCache.java
@@ -208,7 +208,7 @@
"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());
+ log.atFine().withCause(e).log("Exception message %s", e.getMessage());
invalidate(path.getFileName().toString());
} catch (IOException e) {
log.atWarning().withCause(e).log("Cannot read cache %s", websessionsDir);