diff options
author | Sven Selberg <svense@axis.com> | 2022-05-02 15:02:13 +0200 |
---|---|---|
committer | Sven Selberg <sven.selberg@axis.com> | 2022-05-10 11:48:53 +0000 |
commit | 208487a3050354eeceefdaff0c675819e1fff058 (patch) | |
tree | 1aa5ed56116616326be79d8826309a06ac0fa032 | |
parent | c18424b4993817c533a6386ca54cb050bfb6ecd6 (diff) | |
parent | b00f11daf479e5685ae074f092ce2b79a7ad404d (diff) |
Merge branch 'stable-3.4' into stable-3.5
* stable-3.4:
Consider non-empty performance log-records as non-empty
LoggingContext: Consider empty aclLogRecords as emtpy
Fix bug in gr-avatar which wasn't hiding avatars when "hidden" is set
Release-Notes: skip
Change-Id: I15770e210e1ee3ac631720ccc8157bbe35584b55
3 files changed, 10 insertions, 1 deletions
diff --git a/java/com/google/gerrit/server/logging/LoggingContext.java b/java/com/google/gerrit/server/logging/LoggingContext.java index 3907da56a1..eac96a676e 100644 --- a/java/com/google/gerrit/server/logging/LoggingContext.java +++ b/java/com/google/gerrit/server/logging/LoggingContext.java @@ -90,8 +90,9 @@ public class LoggingContext extends com.google.common.flogger.backend.system.Log return tags.get() == null && forceLogging.get() == null && performanceLogging.get() == null + && (performanceLogRecords.get() == null || performanceLogRecords.get().isEmtpy()) && aclLogging.get() == null - && aclLogRecords.get() == null; + && (aclLogRecords.get() == null || aclLogRecords.get().isEmpty()); } public void clear() { diff --git a/java/com/google/gerrit/server/logging/MutableAclLogRecords.java b/java/com/google/gerrit/server/logging/MutableAclLogRecords.java index baa9b1f245..a692d2b178 100644 --- a/java/com/google/gerrit/server/logging/MutableAclLogRecords.java +++ b/java/com/google/gerrit/server/logging/MutableAclLogRecords.java @@ -45,6 +45,10 @@ public class MutableAclLogRecords { return ImmutableList.copyOf(aclLogRecords); } + public boolean isEmpty() { + return aclLogRecords.isEmpty(); + } + @Override public String toString() { return MoreObjects.toStringHelper(this).add("aclLogRecords", aclLogRecords).toString(); diff --git a/java/com/google/gerrit/server/logging/MutablePerformanceLogRecords.java b/java/com/google/gerrit/server/logging/MutablePerformanceLogRecords.java index 4ee70d7c19..2965719f15 100644 --- a/java/com/google/gerrit/server/logging/MutablePerformanceLogRecords.java +++ b/java/com/google/gerrit/server/logging/MutablePerformanceLogRecords.java @@ -46,6 +46,10 @@ public class MutablePerformanceLogRecords { return ImmutableList.copyOf(performanceLogRecords); } + public boolean isEmtpy() { + return performanceLogRecords.isEmpty(); + } + @Override public String toString() { return MoreObjects.toStringHelper(this) |