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

    https://github.com/apache/flink/pull/1415#discussion_r46053991
  
    --- Diff: 
flink-java/src/main/java/org/apache/flink/api/java/typeutils/runtime/AvroSerializer.java
 ---
    @@ -96,27 +93,38 @@ public T createInstance() {
        @Override
        public T copy(T from) {
                checkKryoInitialized();
    -           return this.kryo.copy(from);
    +
    +           try {
    +                   return kryo.copy(from);
    +           } catch (KryoException ke) {
    +                   // Kryo could not copy the object --> try to 
serialize/deserialize the object
    +                   try {
    +                           byte[] byteArray = 
InstantiationUtil.serializeToByteArray(this, from);
    +
    +                           return 
InstantiationUtil.deserializeFromByteArray(this, byteArray);
    +                   } catch (IOException ioe) {
    +                           throw new RuntimeException("Could not copy 
object by serializing/deserializing" +
    --- End diff --
    
    Oh thanks for spotting the missing space. Will fix it.


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