From aae84e01b88fee1030bc6f935c7c907ae4014dba Mon Sep 17 00:00:00 2001 From: Jacek Centkowski Date: Wed, 9 Nov 2022 09:08:48 +0000 Subject: [PATCH 1/2] TaskTree: fix errorprone warning about Flogger See https://errorprone.info/bugpattern/FloggerLogString for details. Change-Id: I8e50b7d1a039d1004a5751b275972de877466f7f --- .../java/com/googlesource/gerrit/plugins/task/TaskTree.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/googlesource/gerrit/plugins/task/TaskTree.java b/src/main/java/com/googlesource/gerrit/plugins/task/TaskTree.java index 9c4b4762..cb7e2d45 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/task/TaskTree.java +++ b/src/main/java/com/googlesource/gerrit/plugins/task/TaskTree.java @@ -261,7 +261,7 @@ protected void addChangesTypeTaskDefinitions( return; } } catch (StorageException e) { - log.atSevere().withCause(e).log("ERROR: running changes query: " + namesFactory.changes); + log.atSevere().withCause(e).log("ERROR: running changes query: %s", namesFactory.changes); } catch (QueryParseException e) { } addSubDefinition(null); From a889f298e7828ff4e0317e7a72d8fd27a03269eb Mon Sep 17 00:00:00 2001 From: Jacek Centkowski Date: Wed, 9 Nov 2022 10:56:49 +0000 Subject: [PATCH 2/2] TaskTree: remove 'ERROR:' prefix from log statement It is redundant as logging level is added automatically by the logging library. Change-Id: Ie7e8186ba3040d9e48e584f2f4c4aad2cf5d28fd --- .../java/com/googlesource/gerrit/plugins/task/TaskTree.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/googlesource/gerrit/plugins/task/TaskTree.java b/src/main/java/com/googlesource/gerrit/plugins/task/TaskTree.java index cb7e2d45..7079918d 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/task/TaskTree.java +++ b/src/main/java/com/googlesource/gerrit/plugins/task/TaskTree.java @@ -261,7 +261,7 @@ protected void addChangesTypeTaskDefinitions( return; } } catch (StorageException e) { - log.atSevere().withCause(e).log("ERROR: running changes query: %s", namesFactory.changes); + log.atSevere().withCause(e).log("Running changes query '%s' failed", namesFactory.changes); } catch (QueryParseException e) { } addSubDefinition(null);