forked from apache/jena
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apacheGH-2402: Improve RDFPatchReaderBinary EOF check
Previously the RDFPatchReaderBinary simply exited its read loop when it detected an EOF error as Thrift doesn't have a clean way of apriori detecting whether we've reached the EOF. The downside of this approach was that it meant the reader would silently ignore some genuinely malformed inputs if they happened to be the right bytes for Thrift to think it had encountered a field it knew about. To address this a new method is introduced that inspects the StackTraceElement's associated with the Thrift EOF exception to detect a couple of cases where the input is clearly malformed and throw an appropriate error. Test cases around malformed patch inputs are also expanded to further test this capability.
- Loading branch information
Showing
3 changed files
with
83 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters