Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2768#discussion_r86987978
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/api/common/state/ListStateDescriptor.java
 ---
    @@ -84,21 +138,37 @@ public boolean equals(Object o) {
     
                ListStateDescriptor<?> that = (ListStateDescriptor<?>) o;
     
    -           return serializer.equals(that.serializer) && 
name.equals(that.name);
    -
    +           return elemTypeSerializer.equals(that.elemTypeSerializer) && 
name.equals(that.name);
        }
     
        @Override
        public int hashCode() {
    -           int result = serializer.hashCode();
    +           int result = elemTypeSerializer.hashCode();
                result = 31 * result + name.hashCode();
                return result;
        }
     
        @Override
        public String toString() {
                return "ListStateDescriptor{" +
    -                           "serializer=" + serializer +
    +                           "elem serializer=" + elemTypeSerializer +
                                '}';
        }
    +
    +   // 
------------------------------------------------------------------------
    +   //  Serialization
    +   // 
------------------------------------------------------------------------
    +
    +   private void writeObject(final ObjectOutputStream out) throws 
IOException {
    +           // make sure we have a serializer before the type information 
gets lost
    +           initializeSerializerUnlessSet(new ExecutionConfig());
    +
    +           // write all the non-transient fields
    +           out.defaultWriteObject();
    +   }
    +
    +   private void readObject(final ObjectInputStream in) throws IOException, 
ClassNotFoundException {
    --- End diff --
    
    I think this method is not necessary, because it only triggers default 
serialization anyways.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to