From 5ff8d28b8943d3eaaac708facadbbb388d479c96 Mon Sep 17 00:00:00 2001 From: ch1010 Date: Sat, 25 Jul 2020 19:31:26 +0800 Subject: [PATCH] Close iter when reset to avoid resource not closed issue (#9035) Signed-off-by: CH Kang --- .../org/datavec/api/records/reader/impl/LineRecordReader.java | 1 + 1 file changed, 1 insertion(+) diff --git a/datavec/datavec-api/src/main/java/org/datavec/api/records/reader/impl/LineRecordReader.java b/datavec/datavec-api/src/main/java/org/datavec/api/records/reader/impl/LineRecordReader.java index c0d39d066..c3163f108 100644 --- a/datavec/datavec-api/src/main/java/org/datavec/api/records/reader/impl/LineRecordReader.java +++ b/datavec/datavec-api/src/main/java/org/datavec/api/records/reader/impl/LineRecordReader.java @@ -173,6 +173,7 @@ public class LineRecordReader extends BaseRecordReader { throw new UnsupportedOperationException("Cannot reset without first initializing"); try { inputSplit.reset(); + close(); initialize(inputSplit); splitIndex = 0; } catch (Exception e) {