Skip to content

Commit

Permalink
Remove unneeded no-arg constructor, and add additional note about cop…
Browse files Browse the repository at this point in the history
…ied code in LICENSE
  • Loading branch information
srowen committed Dec 5, 2014
1 parent 7bb0e66 commit 8586bb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,8 @@ THE SOFTWARE.

========================================================================
For Scala Interpreter classes (all .scala files in repl/src/main/scala
except for Main.Scala, SparkHelper.scala and ExecutorClassLoader.scala):
except for Main.Scala, SparkHelper.scala and ExecutorClassLoader.scala),
and for SerializableMapWrapper in JavaUtils.scala:
========================================================================

Copyright (c) 2002-2013 EPFL
Expand Down
7 changes: 3 additions & 4 deletions core/src/main/scala/org/apache/spark/api/java/JavaUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@ private[spark] object JavaUtils {
new SerializableMapWrapper(underlying)

// Implementation is copied from scala.collection.convert.Wrappers.MapWrapper,
// but implements java.io.Serializable and adds a no-arg constructor
// but implements java.io.Serializable. It can't just be subclassed to make it
// Serializable since the MapWrapper class has no no-arg constructor. This class
// doesn't need a no-arg constructor though.
class SerializableMapWrapper[A, B](underlying: collection.Map[A, B])
extends ju.AbstractMap[A, B] with java.io.Serializable { self =>

// Add no-arg constructor just for serialization
def this() = this(null)

override def size = underlying.size

override def get(key: AnyRef): B = try {
Expand Down

0 comments on commit 8586bb9

Please sign in to comment.