From e9e1adc036643c6b126237903b8e79ab379b1d32 Mon Sep 17 00:00:00 2001 From: "Joseph K. Bradley" Date: Tue, 12 Apr 2016 03:24:26 +0100 Subject: [MINOR][ML] Fixed MLlib build warnings ## What changes were proposed in this pull request? Fixes to eliminate warnings during package and doc builds. ## How was this patch tested? Existing unit tests Author: Joseph K. Bradley Closes #12263 from jkbradley/warning-cleanups. --- .../test/scala/org/apache/spark/ml/tree/impl/RandomForestSuite.scala | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mllib/src') diff --git a/mllib/src/test/scala/org/apache/spark/ml/tree/impl/RandomForestSuite.scala b/mllib/src/test/scala/org/apache/spark/ml/tree/impl/RandomForestSuite.scala index e64551f03c..cd402b1e1f 100644 --- a/mllib/src/test/scala/org/apache/spark/ml/tree/impl/RandomForestSuite.scala +++ b/mllib/src/test/scala/org/apache/spark/ml/tree/impl/RandomForestSuite.scala @@ -327,7 +327,9 @@ class RandomForestSuite extends SparkFunSuite with MLlibTestSparkContext { case n: InternalNode => n.split match { case s: CategoricalSplit => assert(s.leftCategories === Array(1.0)) + case _ => throw new AssertionError("model.rootNode.split was not a CategoricalSplit") } + case _ => throw new AssertionError("model.rootNode was not an InternalNode") } } @@ -352,6 +354,7 @@ class RandomForestSuite extends SparkFunSuite with MLlibTestSparkContext { assert(n.leftChild.isInstanceOf[InternalNode]) assert(n.rightChild.isInstanceOf[InternalNode]) Array(n.leftChild.asInstanceOf[InternalNode], n.rightChild.asInstanceOf[InternalNode]) + case _ => throw new AssertionError("rootNode was not an InternalNode") } // Single group second level tree construction. -- cgit v1.2.3