File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
main/scala/org/apache/spark/ml/param
test/java/org/apache/spark/ml/param Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -387,11 +387,12 @@ trait Params extends Identifiable with Serializable {
387387 /**
388388 * Sets default values for a list of params.
389389 *
390+ * Note: Java developers should use the single-parameter [[setDefault() ]].
391+ * Annotating this with varargs causes compilation failures. See SPARK-7498.
390392 * @param paramPairs a list of param pairs that specify params and their default values to set
391393 * respectively. Make sure that the params are initialized before this method
392394 * gets called.
393395 */
394- @ varargs
395396 protected final def setDefault (paramPairs : ParamPair [_]* ): this .type = {
396397 paramPairs.foreach { p =>
397398 setDefault(p.param.asInstanceOf [Param [Any ]], p.value)
Original file line number Diff line number Diff line change @@ -59,6 +59,5 @@ public JavaTestParams() {
5959 ParamValidators .inArray (validStrings ));
6060 setDefault (myIntParam , 1 );
6161 setDefault (myDoubleParam , 0.5 );
62- setDefault (myIntParam .w (1 ), myDoubleParam .w (0.5 ));
6362 }
6463}
You can’t perform that action at this time.
0 commit comments