mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8212114: Reconsider the affect on closed streams resulting from 8189366
Reviewed-by: chegar, dfuchs
This commit is contained in:
parent
21341a37af
commit
3bafe65a75
2 changed files with 40 additions and 5 deletions
|
@ -232,11 +232,8 @@ class SocketInputStream extends FileInputStream {
|
|||
* @return the number of immediately available bytes
|
||||
*/
|
||||
public int available() throws IOException {
|
||||
if (eof) {
|
||||
return 0;
|
||||
} else {
|
||||
return impl.available();
|
||||
}
|
||||
int available = impl.available();
|
||||
return eof ? 0 : available;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue