From 1fa756eb502886a05c1ebaa465177cc97cafa2d7 Mon Sep 17 00:00:00 2001 From: Edwin Kempin Date: Tue, 3 Jul 2018 09:15:17 +0200 Subject: [PATCH] Fix debug logs from ReviewDbBatchUpdate Change I7a66f63c77 removed the logDebug method from BatchUpdate that had a vararg parameter for the log arguments, but the caller in the logDebug method of ReviewDbBatchUpdate was not adapted. It still called BatchUpdate.logDebug with an argument array, but now that array was cast to an Object and BatchUpdate.logDebug(String, Object) was invoked. As result of this debug logs with no arguments appeared with an error in the logs. E.g. logDebug("Updating change"); resulted in the following log entry: Updating change [ERROR: UNUSED LOG ARGUMENTS] Change-Id: I6c7b642038acca4405fffc532fdc05131b635d38 Signed-off-by: Edwin Kempin --- .../google/gerrit/server/update/ReviewDbBatchUpdate.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/java/com/google/gerrit/server/update/ReviewDbBatchUpdate.java b/java/com/google/gerrit/server/update/ReviewDbBatchUpdate.java index 3c6f6fdf79..9bf4bb2294 100644 --- a/java/com/google/gerrit/server/update/ReviewDbBatchUpdate.java +++ b/java/com/google/gerrit/server/update/ReviewDbBatchUpdate.java @@ -827,8 +827,12 @@ public class ReviewDbBatchUpdate extends BatchUpdate { ReviewDbBatchUpdate.this.logDebug("[" + taskId + "] " + msg, t); } - private void logDebug(String msg, Object... args) { - ReviewDbBatchUpdate.this.logDebug("[" + taskId + "] " + msg, args); + private void logDebug(String msg) { + ReviewDbBatchUpdate.this.logDebug("[" + taskId + "] " + msg); + } + + private void logDebug(String msg, @Nullable Object arg) { + ReviewDbBatchUpdate.this.logDebug("[" + taskId + "] " + msg, arg); } }