wernerdv commented on code in PR #12402:
URL: https://github.com/apache/ignite/pull/12402#discussion_r2703703683


##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/PartitionUpdateCountersMessage.java:
##########
@@ -66,13 +61,38 @@ public PartitionUpdateCountersMessage(int cacheId, int 
initSize) {
         data = new byte[initSize * ITEM_SIZE];
     }
 
+    /**
+     * @return Payload.
+     */
+    public byte[] payload() {
+        if (data == null)
+            return new byte[0];

Review Comment:
   Based on the fact that data is initialized in the constructor and cannot be 
null, I suggest removing this check and adding to 
`IgniteIoCommunicationMessageSerializationTest#initializeMessage`:
   ```
           if (msg instanceof PartitionUpdateCountersMessage)
               FieldUtils.writeField(msg, "data", new byte[0], true);
   ```



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