LoggingContext: Avoid unboxing of Boolean to primitive boolean
Change-Id: I967e3e3ea1e27b1c37671e4c03c65af3239f760c
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user