Github user gdfm commented on a diff in the pull request:

    https://github.com/apache/incubator-samoa/pull/48#discussion_r55137065
  
    --- Diff: 
samoa-api/src/main/java/org/apache/samoa/streams/ArffFileStream.java ---
    @@ -57,32 +60,39 @@ public void prepareForUseImpl(TaskMonitor monitor, 
ObjectRepository repository)
       @Override
       protected void reset() {
         try {
    -      if (this.fileReader != null)
    -        this.fileReader.close();
    -
           fileSource.reset();
         } catch (IOException ioe) {
           throw new RuntimeException("FileStream restart failed.", ioe);
         }
     
    -    if (!getNextFileReader()) {
    +    if (!getNextFileStream()) {
           hitEndOfStream = true;
           throw new RuntimeException("FileStream is empty.");
         }
       }
     
       @Override
    -  protected boolean getNextFileReader() {
    -    boolean ret = super.getNextFileReader();
    -    if (ret) {
    -      this.instances = new Instances(this.fileReader, 1, -1);
    -      if (this.classIndexOption.getValue() < 0) {
    -        this.instances.setClassIndex(this.instances.numAttributes() - 1);
    -      } else if (this.classIndexOption.getValue() > 0) {
    -        this.instances.setClassIndex(this.classIndexOption.getValue() - 1);
    +  protected boolean getNextFileStream() {
    --- End diff --
    
    I guess you try to close each file in the collection separately?
    Does this work for a single file?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to