Bill commented on a change in pull request #6392:
URL: https://github.com/apache/geode/pull/6392#discussion_r625208467



##########
File path: 
geode-core/src/main/java/org/apache/geode/distributed/internal/ReplyMessage.java
##########
@@ -309,11 +316,17 @@ public void fromData(DataInput in,
     if (testFlag(status, PROCESSOR_ID_FLAG)) {
       this.processorId = in.readInt();
     }
-    if (testFlag(status, EXCEPTION_FLAG)) {
-      this.returnValue = DataSerializer.readObject(in);
-      this.returnValueIsException = true;
-    } else if (testFlag(status, OBJECT_FLAG)) {
-      this.returnValue = DataSerializer.readObject(in);
+    try {
+      if (testFlag(status, EXCEPTION_FLAG)) {
+        this.returnValue = context.getDeserializer().readObject(in);
+        this.returnValueIsException = true;
+      } else if (testFlag(status, OBJECT_FLAG)) {
+        this.returnValue = context.getDeserializer().readObject(in);
+        this.returnValueIsException = (returnValue instanceof ReplyException);
+      }
+    } catch (IOException e) {

Review comment:
       I like that answer @bschuchardt !




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