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:
@@ -24,7 +24,8 @@ public class RandomAccessFile implements DataOutput, DataInput
|
||||
{
|
||||
public void close () throws IOException
|
||||
{
|
||||
fd.close();
|
||||
if (fd.valid())
|
||||
fd.close();
|
||||
}
|
||||
|
||||
public final FileDescriptor getFD () throws IOException
|
||||
|
||||
Reference in New Issue
Block a user