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

Clarification about Response.readEntity(XXX) #1166

Open
wants to merge 1 commit into
base: release-4.0
Choose a base branch
from

Conversation

NicoNes
Copy link
Contributor

@NicoNes NicoNes commented Jul 25, 2023

This PR replaces this one #1001.
Exact same content but targeting branch release-4.0

-- Nicolas

Signed-off-by: Nicolas NESMON (NicoNes) <nicolas.nesmon@gmail.com>
* stream are read and stored in a local buffer. The original entity input stream is consumed and automatically closed
* as part of the operation and the method returns {@code true}.
* In case the message entity is backed by an input stream not consumed at all, all the bytes of that input
* stream are read (i.e until <code>inputStream.read() == -1</code>) and stored in a local buffer. That input
Copy link
Contributor

Choose a reason for hiding this comment

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

Overall, this looks like a step in the right direction. However, I think the phrase "not consumed at all" is a bit vague. If we mean, "not a single byte from the input stream has been read", we should be more explicit IMO. This phrase is used multiple times.

Copy link
Contributor

Choose a reason for hiding this comment

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

@NicoNes Could you review and respond to the comment?

Copy link
Contributor Author

@NicoNes NicoNes Dec 14, 2023

Choose a reason for hiding this comment

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

@spericas I agree we can be more exeplicit.
What about saying " In case the message entity is backed by an input stream of which no byte has been read" ?

@spericas spericas added this to In progress in Jakarta REST 5.0 via automation Mar 25, 2024
@spericas spericas added this to the 5.0 milestone Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Jakarta REST 5.0
In progress
Development

Successfully merging this pull request may close these issues.

None yet

2 participants