ibessonov commented on code in PR #6931:
URL: https://github.com/apache/ignite-3/pull/6931#discussion_r2576958427


##########
modules/marshaller-common/src/main/java/org/apache/ignite/internal/marshaller/Marshaller.java:
##########
@@ -283,13 +284,14 @@ private static class PojoMarshaller extends Marshaller {
         /** {@inheritDoc} */
         @Override
         public Object readObject(MarshallerReader reader, Object target) 
throws MarshallerException {
-            Object obj = target == null ? factory.create() : target;
-
-            for (int fldIdx = 0; fldIdx < fieldAccessors.length; fldIdx++) {
-                fieldAccessors[fldIdx].read(reader, obj);
+            if (target != null) {
+                for (int fldIdx = 0; fldIdx < fieldAccessors.length; fldIdx++) 
{
+                    fieldAccessors[fldIdx].read(reader, target);
+                }
+                return target;

Review Comment:
   > I'd rather remove that argument, but I don't know what it can break.
   
   Can you please figure it out?



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