LoggingContext: Avoid unboxing of Boolean to primitive boolean

Change-Id: I967e3e3ea1e27b1c37671e4c03c65af3239f760c
This commit is contained in:
David Pursehouse
2020-05-04 12:31:35 +09:00
parent 9b8238a041
commit 26c2b4b06c

View File

@@ -107,8 +107,7 @@ public class LoggingContext extends com.google.common.flogger.backend.system.Log
}
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 @@ public class LoggingContext extends com.google.common.flogger.backend.system.Log
} else {
forceLogging.remove();
}
return oldValue != null ? oldValue : false;
return Boolean.TRUE.equals(oldValue);
}
}