From 4b9d4aeeec1f840d1dc277d1d8c331bd6b9e91db Mon Sep 17 00:00:00 2001 From: Ewan Date: Tue, 10 Dec 2024 14:50:53 +0800 Subject: [PATCH] [xgb] Fix xgb intern to close replaced array --- .../ml/xgboost/src/main/java/ai/djl/ml/xgboost/XgbNDArray.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engines/ml/xgboost/src/main/java/ai/djl/ml/xgboost/XgbNDArray.java b/engines/ml/xgboost/src/main/java/ai/djl/ml/xgboost/XgbNDArray.java index 62f036469e9..8282f2c5c60 100644 --- a/engines/ml/xgboost/src/main/java/ai/djl/ml/xgboost/XgbNDArray.java +++ b/engines/ml/xgboost/src/main/java/ai/djl/ml/xgboost/XgbNDArray.java @@ -92,7 +92,8 @@ public void intern(NDArray replaced) { throw new IllegalArgumentException("The replaced NDArray cannot be null."); } if (!(replaced instanceof XgbNDArray)) { - throw new IllegalArgumentException("The replaced NDArray must be an instance of XgbNDArray."); + throw new IllegalArgumentException( + "The replaced NDArray must be an instance of XgbNDArray."); } XgbNDArray array = (XgbNDArray) replaced;