mirror of
https://github.com/openRuyi-Project/gcc.git
synced 2026-06-16 00:16:04 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user