File tree Expand file tree Collapse file tree
src/main/java/org/apache/commons/csv Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -740,18 +740,10 @@ private boolean isStrictQuoteMode() {
740740 * {@link NoSuchElementException}.
741741 * </p>
742742 * <p>
743- * For example, the iterator from code such as
744- * <pre>
745- * Iterator{@code<CSVRecord>} items() throws IOException {
746- * try (CSVParser parser = CSVParser.parse( ... )) {
747- * return parser.iterator();
748- * }
749- * }
750- * </pre>
751- * will never yield any records because the parser is closed by the
752- * try-with-resources block.
753- * An alternative is to extract all records as a list with
743+ * If it is necessary to construct an iterator which is usable after the
744+ * parser is closed, one option is to extract all records as a list with
754745 * {@link getRecords()}, and return an iterator to that list.
746+ * </p>
755747 */
756748 @ Override
757749 public Iterator <CSVRecord > iterator () {
@@ -817,6 +809,7 @@ CSVRecord nextRecord() throws IOException {
817809 * <p>
818810 * If the parser is closed, the stream will not produce any more values.
819811 * See the comments in {@link iterator()}.
812+ * </p>
820813 * @return a sequential {@code Stream} with this collection as its source.
821814 * @since 1.9.0
822815 */
You can’t perform that action at this time.
0 commit comments