Skip to content

[CSV-274] Add comments to iterator() and stream()#270

Merged
garydgregory merged 2 commits into
apache:masterfrom
pedro-w:csv-274-documentation
Oct 7, 2022
Merged

[CSV-274] Add comments to iterator() and stream()#270
garydgregory merged 2 commits into
apache:masterfrom
pedro-w:csv-274-documentation

Conversation

@pedro-w

@pedro-w pedro-w commented Oct 5, 2022

Copy link
Copy Markdown
Contributor

This is purely an addition to the Javadocs, to call out what happens to an iterator or stream when the underlying CSVParser is closed.

https://issues.apache.org/jira/projects/CSV/issues/CSV-274

@kinow kinow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks @pedro-w !

@kinow kinow requested a review from garydgregory October 5, 2022 20:54
Comment thread src/main/java/org/apache/commons/csv/CSVParser.java
Comment thread src/main/java/org/apache/commons/csv/CSVParser.java
@codecov-commenter

codecov-commenter commented Oct 6, 2022

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.34%. Comparing base (f36e0f5) to head (5fbd353).
⚠️ Report is 1233 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #270      +/-   ##
============================================
- Coverage     97.34%   97.34%   -0.01%     
  Complexity      535      535              
============================================
  Files            11       11              
  Lines          1169     1167       -2     
  Branches        205      203       -2     
============================================
- Hits           1138     1136       -2     
  Misses           18       18              
  Partials         13       13              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@garydgregory garydgregory merged commit d46919d into apache:master Oct 7, 2022
* <p>
* If it is necessary to construct an iterator which is usable after the
* parser is closed, one option is to extract all records as a list with
* {@link getRecords()}, and return an iterator to that list.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pedro-w For future reference: {@link getRecords()} is NOT legal Javadoc syntax, use {@link #getRecords()}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I didn't realise that (also I thought I'd addressed all the warnings displayed when building the project). I see you fixed it in 22df0e2, thanks!

*
* <p>
* If the parser is closed, the stream will not produce any more values.
* See the comments in {@link iterator()}.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pedro-w For future reference: {@link iterator()} is NOT legal Javadoc syntax, use {@link #iterator()}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants