Skip to content

CharSequenceReader.skip should return 0 instead of EOF on stream end#123

Merged
garydgregory merged 1 commit into
apache:masterfrom
robtimus:CharSequenceReader.skip
Jul 9, 2020
Merged

CharSequenceReader.skip should return 0 instead of EOF on stream end#123
garydgregory merged 1 commit into
apache:masterfrom
robtimus:CharSequenceReader.skip

Conversation

@robtimus

@robtimus robtimus commented Jul 8, 2020

Copy link
Copy Markdown
Contributor

Reader.skip(long n) should return

The number of characters actually skipped

The current implementation of CharSequenceReader instead returns EOF, which is -1. This should be 0, which is just what this PR changes.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.06%) to 89.772% when pulling 1388450 on robtimus:CharSequenceReader.skip into 821ab5f on apache:master.

@jochenw

jochenw commented Jul 9, 2020

Copy link
Copy Markdown
Contributor

Approving. This introduces a minor incompatibility, but I guess, that the skip method is rarely used, and the spec rules.

@garydgregory garydgregory merged commit 807e61e into apache:master Jul 9, 2020
@robtimus robtimus deleted the CharSequenceReader.skip branch December 6, 2020 13:13
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.

5 participants