You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by GitBox <gi...@apache.org> on 2021/02/02 18:03:16 UTC
[GitHub] [avro] noslowerdna opened a new pull request #1080: AVRO-2944: Handle unexpected EOF reading magic bytes in DataFileReader
noslowerdna opened a new pull request #1080:
URL: https://github.com/apache/avro/pull/1080
Covers an additional potential issue in the static method for creating a DataFileReader. Let me know if I should create a new JIRA instead of reusing this one. The logic here now more readably follows the same pattern established in the BinaryDecoder's [readRaw](https://github.com/apache/avro/blob/328c539afc77da347ec52be1e112a6a7c371143b/lang/java/avro/src/main/java/org/apache/avro/io/BinaryDecoder.java#L846) method, with an unexpected early EOF being properly handled.
Make sure you have checked _all_ steps below.
### https://issues.apache.org/jira/browse/AVRO-2944
- [x] My PR addresses the following [Avro Jira](https://issues.apache.org/jira/browse/AVRO/) issues and references them in the PR title. For example, "AVRO-1234: My Avro PR"
- https://issues.apache.org/jira/browse/AVRO-XXX
- In case you are adding a dependency, check if the license complies with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
### Tests
- [x] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
In TestDataFileReader:
- testInputStreamEOF
Unrelated to this change, added these 2 tests to improve code coverage,
- testInvalidMagicLength
- testInvalidMagicBytes
### Commits
- [x] My commits all reference Jira issues in their subject lines. In addition, my commits follow the guidelines from "[How to write a good git commit message](https://chris.beams.io/posts/git-commit/)":
1. Subject is separated from body by a blank line
1. Subject is limited to 50 characters (not including Jira issue reference)
1. Subject does not end with a period
1. Subject uses the imperative mood ("add", not "adding")
1. Body wraps at 72 characters
1. Body explains "what" and "why", not "how"
### Documentation
- [x] In case of new functionality, my PR adds documentation that describes how to use it.
- All the public functions and the classes in the PR contain Javadoc that explain what it does
N/A
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [avro] RyanSkraba merged pull request #1080: AVRO-2944: Handle unexpected EOF reading magic bytes in DataFileReader
Posted by GitBox <gi...@apache.org>.
RyanSkraba merged pull request #1080:
URL: https://github.com/apache/avro/pull/1080
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [avro] RyanSkraba commented on pull request #1080: AVRO-2944: Handle unexpected EOF reading magic bytes in DataFileReader
Posted by GitBox <gi...@apache.org>.
RyanSkraba commented on pull request #1080:
URL: https://github.com/apache/avro/pull/1080#issuecomment-772660867
Cherry picked to [branch-1.10](https://github.com/apache/avro/commits/2204341be6ba156669b094fb738325edd675fd19), so you'll see this in the next release. Thanks for the contribution!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org