Skip to content

Conversation

cunningt
Copy link
Contributor

@cunningt cunningt commented Feb 3, 2025

https://issues.apache.org/jira/browse/CXF-9107

Clean up coverity resource leaks (inputstream and resultset) and a javascript method typo

} else {
response = checkAdapter(response, type, anns, false);
}
realStream.close();
Copy link
Member

Choose a reason for hiding this comment

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

So this may not work: the stream is not created here and should not be closed here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can we do this within a try-with-resources?

Copy link
Member

@reta reta Feb 5, 2025

Choose a reason for hiding this comment

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

I am pretty sure it is being done this way (higher in the stack), when the request / response body is being processed

Copy link
Member

Choose a reason for hiding this comment

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

@cunningt could you please revert this one change and we are good to go, as per spec:

The caller is responsible for ensuring that the input stream ends when the entity has been consumed. The implementation should not close the input stream.

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.

2 participants