From 1749e8d5f453ba98504b2d0b3890ce72996db7ba Mon Sep 17 00:00:00 2001 From: Villu Ruusmann Date: Fri, 22 Mar 2019 11:51:59 +0200 Subject: [PATCH] Employed JDK utility methods --- src/main/java/org/jpmml/h2o/Converter.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/jpmml/h2o/Converter.java b/src/main/java/org/jpmml/h2o/Converter.java index 3524e44..13ff998 100644 --- a/src/main/java/org/jpmml/h2o/Converter.java +++ b/src/main/java/org/jpmml/h2o/Converter.java @@ -19,6 +19,7 @@ package org.jpmml.h2o; import java.lang.reflect.Field; +import java.util.Objects; import hex.genmodel.MojoModel; import org.dmg.pmml.DataField; @@ -85,12 +86,7 @@ public M getModel(){ } private void setModel(M model){ - - if(model == null){ - throw new IllegalArgumentException(); - } - - this.model = model; + this.model = Objects.requireNonNull(model); } static