commit | 26c2b4b06c0528fcd6dd71450a9a5f02b74575e5 | [log] [tgz] |
---|---|---|
author | David Pursehouse <dpursehouse@digital.ai> | Mon May 04 12:31:35 2020 +0900 |
committer | David Pursehouse <dpursehouse@digital.ai> | Mon May 04 12:31:35 2020 +0900 |
tree | 2fed742e83c10c922b8b99dd4bf8b37edc41b805 | |
parent | 9b8238a041711d8f26cdf1f03dd66b7b0d39ab06 [diff] |
LoggingContext: Avoid unboxing of Boolean to primitive boolean Change-Id: I967e3e3ea1e27b1c37671e4c03c65af3239f760c
diff --git a/java/com/google/gerrit/server/logging/LoggingContext.java b/java/com/google/gerrit/server/logging/LoggingContext.java index 1e81c29..cb7d01e 100644 --- a/java/com/google/gerrit/server/logging/LoggingContext.java +++ b/java/com/google/gerrit/server/logging/LoggingContext.java
@@ -107,8 +107,7 @@ } boolean isLoggingForced() { - Boolean force = forceLogging.get(); - return force != null ? force : false; + return Boolean.TRUE.equals(forceLogging.get()); } boolean forceLogging(boolean force) { @@ -118,6 +117,6 @@ } else { forceLogging.remove(); } - return oldValue != null ? oldValue : false; + return Boolean.TRUE.equals(oldValue); } }