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

    https://github.com/apache/spark/pull/3587#discussion_r21377699
  
    --- Diff: core/src/main/scala/org/apache/spark/api/java/JavaUtils.scala ---
    @@ -32,7 +33,65 @@ private[spark] object JavaUtils {
       def mapAsSerializableJavaMap[A, B](underlying: collection.Map[A, B]) =
         new SerializableMapWrapper(underlying)
     
    +  // Implementation is copied from 
scala.collection.convert.Wrappers.MapWrapper,
    +  // but implements java.io.Serializable and adds a no-arg constructor
       class SerializableMapWrapper[A, B](underlying: collection.Map[A, B])
    -    extends MapWrapper(underlying) with java.io.Serializable
    +    extends ju.AbstractMap[A, B] with java.io.Serializable { self =>
     
    +    // Add no-arg constructor just for serialization
    +    def this() = this(null)
    --- End diff --
    
    Hm, so it does. Maybe I misunderstood the original error. It's complaining 
about the _superclass_ (`MapWrapper`) not having a no-arg constructor? So 
copying the class works, since we no longer subclass `MapWrapper`, but the copy 
in `SerializableMapWrapper` need not define a no-arg constructor. OK, that line 
can be removed.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to