[
https://issues.apache.org/jira/browse/IO-782?focusedWorklogId=814791&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-814791
]
ASF GitHub Bot logged work on IO-782:
-------------------------------------
Author: ASF GitHub Bot
Created on: 07/Oct/22 19:40
Start Date: 07/Oct/22 19:40
Worklog Time Spent: 10m
Work Description: garydgregory commented on code in PR #391:
URL: https://github.com/apache/commons-io/pull/391#discussion_r990449493
##########
src/main/java/org/apache/commons/io/input/SequenceReader.java:
##########
@@ -33,19 +36,21 @@ public class SequenceReader extends Reader {
private Reader reader;
private Iterator<? extends Reader> readers;
+ private Iterable<? extends Reader> readersIterable;
/**
* Constructs a new instance with readers
*
* @param readers the readers to read
*/
public SequenceReader(final Iterable<? extends Reader> readers) {
- this.readers = Objects.requireNonNull(readers, "readers").iterator();
+ this.readersIterable = Objects.requireNonNull(readers, "readers");
+ this.readers = readers.iterator();
this.reader = nextReader();
}
/**
- * Constructs a new instance with readers
+ * Construct a new instance with readers
Review Comment:
Don't change the Javadoc style please.
Issue Time Tracking
-------------------
Worklog Id: (was: 814791)
Time Spent: 1h (was: 50m)
> SequenceReader should close readers when its close method is called
> -------------------------------------------------------------------
>
> Key: IO-782
> URL: https://issues.apache.org/jira/browse/IO-782
> Project: Commons IO
> Issue Type: Bug
> Components: Streams/Writers
> Affects Versions: 2.11.0
> Reporter: matteodg
> Priority: Major
> Time Spent: 1h
> Remaining Estimate: 0h
>
> {{SequenceReader.close()}} method should close readers.
> This is to be compliant with common practice of any {{Reader}} decorator,
> like for example {{BufferedReader}} is doing.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)