From e0a578092ec8e49aa3f74528284fafee5db129c1 Mon Sep 17 00:00:00 2001 From: Arno Candel Date: Thu, 7 Aug 2014 08:33:52 -0700 Subject: [PATCH] Add missing NPE checks. --- src/test/java/hex/DeepLearningIrisTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/hex/DeepLearningIrisTest.java b/src/test/java/hex/DeepLearningIrisTest.java index 73378606a9..efe2adafb4 100644 --- a/src/test/java/hex/DeepLearningIrisTest.java +++ b/src/test/java/hex/DeepLearningIrisTest.java @@ -279,7 +279,7 @@ void runFraction(float fraction) { // } } } finally { - fpreds.delete(); + if (fpreds != null) fpreds.delete(); } Log.info("Predicted values: PASS"); @@ -317,7 +317,7 @@ void runFraction(float fraction) { Log.info("Best_model's error : " + bestErr * 100 + "%."); compareVal(bestErr, best_err, abseps, releps); } finally { - bestPredict.delete(); + if (bestPredict != null) bestPredict.delete(); } }