FileInputStream.java (close): Check if the fd is valid.
* java/io/FileInputStream.java (close): Check if the fd is valid. * java/io/RandomAccessFile.java (close): Ditto. * java/net/PlainDatagramSocketImpl.java (close): Ditto. * java/net/PlainSocketImpl.java (close): Ditto. From-SVN: r38131
This commit is contained in:
parent
cf9f5da02f
commit
be17b0fcff
5 changed files with 15 additions and 8 deletions
|
@ -51,11 +51,8 @@ public class FileInputStream extends InputStream
|
|||
|
||||
public void close() throws IOException
|
||||
{
|
||||
if (fd == null)
|
||||
return;
|
||||
|
||||
fd.close();
|
||||
fd = null;
|
||||
if (fd.valid())
|
||||
fd.close();
|
||||
}
|
||||
|
||||
protected void finalize() throws IOException
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue