build: fix log(String) must be compile-time constants
ItsValidateComment.java:82: 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. logger.atWarning().withCause(e).log(synopsis);
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Change-Id: I82d7445250d5dc8ea6794309a42a5e40b98bfdc6
diff --git a/src/main/java/com/googlesource/gerrit/plugins/its/base/validation/ItsValidateComment.java b/src/main/java/com/googlesource/gerrit/plugins/its/base/validation/ItsValidateComment.java
index 074b882..f4c7ce0 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/its/base/validation/ItsValidateComment.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/its/base/validation/ItsValidateComment.java
@@ -79,7 +79,7 @@
"Failed to check whether or not issue "
+ issueId
+ " exists, due to connectivity issue. Commit will be accepted.";
- logger.atWarning().withCause(e).log(synopsis);
+ logger.atWarning().withCause(e).log("%s", synopsis);
details = e.toString();
existenceCheckResult = ItsExistenceCheckResult.CONNECTIVITY_FAILURE;
ret.add(commitValidationFailure(synopsis, details, existenceCheckResult));