diff options
author | Michael Armbrust <michael@databricks.com> | 2014-06-24 19:39:19 -0700 |
---|---|---|
committer | Reynold Xin <rxin@apache.org> | 2014-06-24 19:39:31 -0700 |
commit | d3dbaf5a788af77c3d253e7dc6ea7ce54fe6fbe0 (patch) | |
tree | 865906464151220e83700190ecded8403deb7d4f | |
parent | e199a02dd4b119be2bcbdeeec6d78b87939d9577 (diff) | |
download | spark-d3dbaf5a788af77c3d253e7dc6ea7ce54fe6fbe0.tar.gz spark-d3dbaf5a788af77c3d253e7dc6ea7ce54fe6fbe0.tar.bz2 spark-d3dbaf5a788af77c3d253e7dc6ea7ce54fe6fbe0.zip |
Fix possible null pointer in acumulator toString
Author: Michael Armbrust <michael@databricks.com>
Closes #1204 from marmbrus/nullPointerToString and squashes the following commits:
35b5fce [Michael Armbrust] Fix possible null pointer in acumulator toString
(cherry picked from commit 2714968e1b40221739c5dfba7ca4c0c06953dbe2)
Signed-off-by: Reynold Xin <rxin@apache.org>
-rw-r--r-- | core/src/main/scala/org/apache/spark/Accumulators.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/Accumulators.scala b/core/src/main/scala/org/apache/spark/Accumulators.scala index cdfd338081..9c55bfbb47 100644 --- a/core/src/main/scala/org/apache/spark/Accumulators.scala +++ b/core/src/main/scala/org/apache/spark/Accumulators.scala @@ -127,7 +127,7 @@ class Accumulable[R, T] ( Accumulators.register(this, false) } - override def toString = value_.toString + override def toString = if (value_ == null) "null" else value_.toString } /** |