alamar commented on a change in pull request #8868:
URL: https://github.com/apache/ignite/pull/8868#discussion_r594319612



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/binary/BinaryEnumObjectImpl.java
##########
@@ -473,4 +473,13 @@ public BinaryEnumObjectImpl(BinaryContext ctx, byte[] arr) 
{
 
         return reader.afterMessageRead(BinaryEnumObjectImpl.class);
     }
+
+    /** {@inheritDoc} */
+    @Override public int size() {
+        if (valBytes == null) {

Review comment:
       I don't think that returning -1 is meaningful here. We should marshal if 
size() requested and valBytes is null, such as in valueBytes, e.g.:
   
           if (valBytes != null)
               return valBytes;
   
           valBytes = U.marshal(ctx.marshaller(), this);
   
           return valBytes;
   
   Also, please note that if() with single-line body should not be 
brace-indented.




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