geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEODE-4008) InvalidClassException when deserializing FunctionAdapter from pre Geode clients
Date Wed, 06 Dec 2017 00:00:08 GMT

    [ https://issues.apache.org/jira/browse/GEODE-4008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16279401#comment-16279401
] 

ASF GitHub Bot commented on GEODE-4008:
---------------------------------------

pivotal-jbarrett commented on a change in pull request #1119: GEODE-4008: Add serialVersionUID
of older clients to FunctionAdapter
URL: https://github.com/apache/geode/pull/1119#discussion_r155112748
 
 

 ##########
 File path: geode-core/src/test/java/org/apache/geode/cache/execute/FunctionAdapterJUnitTest.java
 ##########
 @@ -16,15 +16,26 @@
 
 import static org.junit.Assert.*;
 
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.Serializable;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
+import org.apache.geode.internal.InternalDataSerializer;
+import org.apache.geode.internal.Version;
+import org.apache.geode.internal.VersionedDataInputStream;
 import org.apache.geode.test.junit.categories.UnitTest;
+import org.apache.geode.util.test.TestUtil;
 
 @Category(UnitTest.class)
-public class FunctionAdapterJUnitTest {
+public class FunctionAdapterJUnitTest implements Serializable {
 
 Review comment:
   Is the test class only `Serializable` to serialize the anonymous inner class? Seems cleaner
to have a static inner class and not make the test class `Serializable`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> InvalidClassException when deserializing FunctionAdapter from pre Geode clients
> -------------------------------------------------------------------------------
>
>                 Key: GEODE-4008
>                 URL: https://issues.apache.org/jira/browse/GEODE-4008
>             Project: Geode
>          Issue Type: Bug
>          Components: functions
>            Reporter: Jason Huynh
>            Assignee: Jason Huynh
>
> There was a change to deprecate FunctionAdapter in Geode, and this removed the method
signatures of the class.  This causes Java to assign a new serialVersionUID to the class.
 However we have clients pre Geode that when they attempt to execute a function by serializing
the function across (not using a function id), the FunctionAdapter class is unable to deserialize
properly.
> The proposed fix is to assign a serialVersionUID to the class that matches that of the
pre Geode FunctionAdapter.  This will cause any Geode 1.0-1.3 clients to run into this same
error.  However FunctionAdapter has been deprecated and it would be easy enough to just change
the classes to implement Function.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message