Merge branch 'stable-2.16' into stable-3.0

* stable-2.16:
  LoggingContext: Avoid unboxing of Boolean to primitive boolean

Change-Id: I54d94252abf056a6845a6b2158014b3f3cf5c246
This commit is contained in:
David Pursehouse
2020-05-04 15:15:22 +09:00

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);
}
}