ascherbakoff commented on a change in pull request #8235:
URL: https://github.com/apache/ignite/pull/8235#discussion_r490198438



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
##########
@@ -1138,14 +1139,15 @@ public void processJobExecuteResponse(UUID nodeId, 
GridJobExecuteResponse msg) {
         lock.readLock();
 
         try {
+            GridTaskWorker<?, ?> task = tasks.get(msg.getSessionId());

Review comment:
       Why this is not inlined in method argument, like
   
   tryResolveTaskName(tasks.get(msg.getSessionId()) ?
   
   The same for other calls.

##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
##########
@@ -1530,4 +1536,9 @@ else if (msg instanceof GridTaskSessionRequest)
             }
         }
     }
+
+    /** Tries to get task name in appended form(after ', '). */
+    @NotNull private static String tryResolveTaskName(GridTaskWorker<?, ?> 
task) {

Review comment:
       Missing _param_.
   Missing _Nullable_ annotation on method arg.

##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/task/GridTaskProcessor.java
##########
@@ -1530,4 +1536,9 @@ else if (msg instanceof GridTaskSessionRequest)
             }
         }
     }
+
+    /** Tries to get task name in appended form(after ', '). */
+    @NotNull private static String tryResolveTaskName(GridTaskWorker<?, ?> 
task) {
+        return task != null && task.getSession() != null ? (", " + 
task.getSession().getTaskName()) : "";

Review comment:
       This looks dirty.
   I suggest to create a method like
   formatMessage(String msg, Nullable GridTaskWorker<?, ?> task)




----------------------------------------------------------------
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.

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


Reply via email to