From aa6c2b48c148b034722510924e3aa1a61c6407fb Mon Sep 17 00:00:00 2001 From: nicovdijk Date: Mon, 18 Oct 2021 16:33:14 +0200 Subject: [PATCH] updated copyright year and a code comment --- .../ml/dmlc/xgboost4j/scala/spark/params/Utils.scala | 8 ++++---- .../scala/ml/dmlc/xgboost4j/scala/spark/CustomObj.scala | 2 +- .../ml/dmlc/xgboost4j/scala/spark/PersistenceSuite.scala | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/jvm-packages/xgboost4j-spark/src/main/scala/ml/dmlc/xgboost4j/scala/spark/params/Utils.scala b/jvm-packages/xgboost4j-spark/src/main/scala/ml/dmlc/xgboost4j/scala/spark/params/Utils.scala index cd4d588f788b..ddbef93747f8 100644 --- a/jvm-packages/xgboost4j-spark/src/main/scala/ml/dmlc/xgboost4j/scala/spark/params/Utils.scala +++ b/jvm-packages/xgboost4j-spark/src/main/scala/ml/dmlc/xgboost4j/scala/spark/params/Utils.scala @@ -1,5 +1,5 @@ /* - Copyright (c) 2014 by Contributors + Copyright (c) 2014,2021 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ private[spark] object Utils { /** * Get the TypeHints according to the value - * @param value the instance of customized obj/eval + * @param value the instance of class to be serialized * @return if value is null, * return NoTypeHints * else return the FullTypeHints. @@ -44,9 +44,9 @@ private[spark] object Utils { * so we can find the jsonClass and turn it to FullTypeHints when deserializing. */ def getTypeHintsFromClass(value: Any): TypeHints = { - if (value == null) { + if (value == null) { // XGBoost will save the default value (null) NoTypeHints - } else { // XGBoost will save the default values + } else { // XGBoost will save the full instance FullTypeHints(List(value.getClass)) } } diff --git a/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/CustomObj.scala b/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/CustomObj.scala index 432a950dcb7e..b9a39a14d4f7 100644 --- a/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/CustomObj.scala +++ b/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/CustomObj.scala @@ -1,5 +1,5 @@ /* - Copyright (c) 2014 by Contributors + Copyright (c) 2021 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/PersistenceSuite.scala b/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/PersistenceSuite.scala index 788436e89017..a1732c7f7e1b 100755 --- a/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/PersistenceSuite.scala +++ b/jvm-packages/xgboost4j-spark/src/test/scala/ml/dmlc/xgboost4j/scala/spark/PersistenceSuite.scala @@ -1,5 +1,5 @@ /* - Copyright (c) 2014 by Contributors + Copyright (c) 2014,2021 by Contributors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.