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:
Warren Levy 2000-12-08 10:28:32 +00:00 committed by Warren Levy
parent cf9f5da02f
commit be17b0fcff
5 changed files with 15 additions and 8 deletions

View file

@ -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