[ https://issues.apache.org/jira/browse/IO-685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrea Rombaldi updated IO-685: ------------------------------- Summary: LineReader to implement AutoCloseable (was: org.apache.commons.io.LineReader to implement AutoCloseable) > LineReader to implement AutoCloseable > ------------------------------------- > > Key: IO-685 > URL: https://issues.apache.org/jira/browse/IO-685 > Project: Commons IO > Issue Type: Improvement > Components: Utilities > Affects Versions: 2.7 > Reporter: Andrea Rombaldi > Priority: Major > Fix For: 3.x, 2.8.0 > > Original Estimate: 10m > Remaining Estimate: 10m > > org.apache.commons.io.LineReader should implement the AutoCloseable interface > in order to allow the use of try-with-resources statement such as in the > following example: > {{try (final LineIterator itr = new LineIterator(new > FileReader("c:/temp/readme.txt"))) {}} > {{ while (itr.hasNext()) {}} > {{ System.out.println(itr.next());}} > {{ }}} > {{ }}} > -- This message was sent by Atlassian Jira (v8.3.4#803005)