-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: testIssues in the test moduleIssues in the test moduletype: enhancementA general enhancementA general enhancement
Milestone
Description
Ketan Padegaonkar opened SPR-16416 and commented
InputStream#available() is expected to answer the remaining number of bytes that can be read without blocking. The default implementation returns a 0, but subclasses may override it.
The DelegatingServletInputStream which delegates to a ByteArrayOutputStream would be expected to delegate this call to the stream it wraps over, instead of delegating to the superclass and return a 0.
I can submit a PR on github with this implementation if it's allright with the core team:
public class DelegatingServletInputStream extends ServletInputStream {
...
@Override
public int available() throws IOException {
return this.sourceStream.available();
}
...
}Affects: 5.0.3
Referenced from: pull request #1652
Metadata
Metadata
Assignees
Labels
in: testIssues in the test moduleIssues in the test moduletype: enhancementA general enhancementA general enhancement