src/java.base/unix/classes/sun/nio/ch/FileKey.java
Print this page
rev 11066 : 8025619: (fc) FileInputStream.getChannel on closed stream returns FileChannel that doesn't know that stream is closed
Summary: FileKey.create() should throw an IOException directly instead of wrapping it in an Error.
Reviewed-by: TBD
@@ -36,17 +36,13 @@
private long st_dev; // ID of device
private long st_ino; // Inode number
private FileKey() { }
- public static FileKey create(FileDescriptor fd) {
+ public static FileKey create(FileDescriptor fd) throws IOException {
FileKey fk = new FileKey();
- try {
fk.init(fd);
- } catch (IOException ioe) {
- throw new Error(ioe);
- }
return fk;
}
public int hashCode() {
return (int)(st_dev ^ (st_dev >>> 32)) +