Merge pull request #490 from hsaputra/modify_checkoption_with_isdefined

Replace the check for None Option with isDefined and isEmpty in Scala code

Propose to replace the Scala check for Option "!= None" with Option.isDefined 
and "=== None" with Option.isEmpty.

I think this, using method call if possible then operator function plus 
argument, will make the Scala code easier to read and understand.

Pass compile and tests.


Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/f16c21e2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/f16c21e2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/f16c21e2

Branch: refs/heads/master
Commit: f16c21e22f706b268419fefce44e9905db3ee485
Parents: f67ce3e 90ea9d5
Author: Reynold Xin <r...@apache.org>
Authored: Mon Jan 27 14:24:06 2014 -0800
Committer: Reynold Xin <r...@apache.org>
Committed: Mon Jan 27 14:24:06 2014 -0800

----------------------------------------------------------------------
 .../scala/org/apache/spark/Partitioner.scala    |   2 +-
 .../deploy/master/ui/ApplicationPage.scala      |   2 +-
 .../apache/spark/metrics/MetricsConfig.scala    |   2 +-
 .../partial/ApproximateActionListener.scala     |   2 +-
 .../apache/spark/partial/PartialResult.scala    |  16 +--
 .../main/scala/org/apache/spark/rdd/RDD.scala   |   2 +-
 .../apache/spark/scheduler/DAGScheduler.scala   |   2 +-
 .../org/apache/spark/scheduler/Stage.scala      |   2 +-
 .../spark/scheduler/TaskSchedulerImpl.scala     |   4 +-
 .../spark/storage/BlockManagerWorker.scala      |   2 +-
 .../org/apache/spark/storage/MemoryStore.scala  |   2 +-
 .../scala/org/apache/spark/util/Utils.scala     |   2 +-
 .../spark/scheduler/TaskSetManagerSuite.scala   |   2 +-
 .../spark/storage/BlockManagerSuite.scala       | 126 +++++++++----------
 14 files changed, 84 insertions(+), 84 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/f16c21e2/core/src/main/scala/org/apache/spark/util/Utils.scala
----------------------------------------------------------------------

Reply via email to