* 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
+2000-12-08 Warren Levy <warrenl@redhat.com>
+
+ * 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.
+
2000-12-06 Tom Tromey <tromey@redhat.com>
* java/awt/GridBagConstraints.java: Filled in values for static
public void close() throws IOException
{
- if (fd == null)
- return;
-
- fd.close();
- fd = null;
+ if (fd.valid())
+ fd.close();
}
protected void finalize() throws IOException
{
public void close () throws IOException
{
- fd.close();
+ if (fd.valid())
+ fd.close();
}
public final FileDescriptor getFD () throws IOException
// we'll catch the IOException here.
try
{
- fd.close();
+ if (fd.valid())
+ fd.close();
}
catch (IOException e)
{
protected void close () throws IOException
{
- fd.close();
+ if (fd.valid())
+ fd.close();
}
}