Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrates IonReaderContinuableTopLevelBinaryTest.java to JUnit 5. #605

Closed

Conversation

tgregg
Copy link
Contributor

@tgregg tgregg commented Oct 12, 2023

Issue #, if available:
Partially addresses #428 by migrating to JUnit 5 and using assertThrows rather than the alternatives.

Restructuring the tests to look like the ones in #604 will be done in a future PR.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@tgregg tgregg requested a review from jobarr-amzn October 12, 2023 01:23
* @param bytes the binary Ion data.
* @return a new reader.
*/
private IonReader readerFor(IonReaderBuilder builder, byte[] bytes) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Scrolling back a ways to reach this method, my only quibble in this PR so far is the name of the parameter constructFromBytes. Given a byte[] bytes it seems natural that requested reader would be constructed from it, so requiring a boolean true for this state of affairs seems odd. But it gets weirder when constructFomBytes == false. true I understand, but what will false do?

The documentation for this parameter "whether to construct the reader from bytes or an InputStream" clears that up, but it makes me wonder whether this parameter to be wrapBytesWithInputStream 🤷‍♂️.

@tgregg tgregg closed this in #615 Oct 18, 2023
@tgregg tgregg deleted the reentrant-reader-base-pr32 branch January 16, 2024 19:29
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.

3 participants