gemini-code-assist[bot] commented on code in PR #39034:
URL: https://github.com/apache/beam/pull/39034#discussion_r3441226134


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/logging/DataflowWorkerLoggingInitializer.java:
##########
@@ -217,17 +217,16 @@ private static void applyOverridesToLogger(
       boolean directLoggingEnabled) {
     if (!directLoggingEnabled) {
       logger.setLevel(overrides.disk);
-      if (overrides.disk.intValue() != Level.OFF.intValue()) {
+      if (overrides.direct.intValue() != Level.OFF.intValue()) {

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   To prevent a potential `NullPointerException`, consider adding a null check 
for `overrides.direct` before calling `intValue()` on it, especially if the 
direct logging override can be undefined or null.
   
   ```suggestion
         if (overrides.direct != null && overrides.direct.intValue() != 
Level.OFF.intValue()) {
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to