# HG changeset patch # User bpb # Date 1509041311 25200 # Node ID b6d959fae9ef359ddc6073d9cb3e7cc38e6a1e7a # Parent a6e591e12f122768f675428e1e5a838fd0e9c7ec 8189963: Remove version of FileChannelImpl::open without the 'direct' parameter Summary: Remove old version of FileChannelImpl::open and update call sites Reviewed-by: rriggs diff -r a6e591e12f12 -r b6d959fae9ef src/java.base/share/classes/java/io/FileInputStream.java --- a/src/java.base/share/classes/java/io/FileInputStream.java Thu Oct 26 10:46:29 2017 -0700 +++ b/src/java.base/share/classes/java/io/FileInputStream.java Thu Oct 26 11:08:31 2017 -0700 @@ -385,7 +385,8 @@ synchronized (this) { fc = this.channel; if (fc == null) { - this.channel = fc = FileChannelImpl.open(fd, path, true, false, this); + this.channel = fc = FileChannelImpl.open(fd, path, true, + false, false, this); if (closed) { try { // possible race with close(), benign since diff -r a6e591e12f12 -r b6d959fae9ef src/java.base/share/classes/java/io/FileOutputStream.java --- a/src/java.base/share/classes/java/io/FileOutputStream.java Thu Oct 26 10:46:29 2017 -0700 +++ b/src/java.base/share/classes/java/io/FileOutputStream.java Thu Oct 26 11:08:31 2017 -0700 @@ -410,7 +410,8 @@ synchronized (this) { fc = this.channel; if (fc == null) { - this.channel = fc = FileChannelImpl.open(fd, path, false, true, this); + this.channel = fc = FileChannelImpl.open(fd, path, false, + true, false, this); if (closed) { try { // possible race with close(), benign since diff -r a6e591e12f12 -r b6d959fae9ef src/java.base/share/classes/java/io/RandomAccessFile.java --- a/src/java.base/share/classes/java/io/RandomAccessFile.java Thu Oct 26 10:46:29 2017 -0700 +++ b/src/java.base/share/classes/java/io/RandomAccessFile.java Thu Oct 26 11:08:31 2017 -0700 @@ -298,7 +298,8 @@ synchronized (this) { fc = this.channel; if (fc == null) { - this.channel = fc = FileChannelImpl.open(fd, path, true, rw, this); + this.channel = fc = FileChannelImpl.open(fd, path, true, + rw, false, this); if (closed.get()) { try { fc.close(); diff -r a6e591e12f12 -r b6d959fae9ef src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java --- a/src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java Thu Oct 26 10:46:29 2017 -0700 +++ b/src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java Thu Oct 26 11:08:31 2017 -0700 @@ -142,13 +142,6 @@ // and RandomAccessFile.getChannel() public static FileChannel open(FileDescriptor fd, String path, boolean readable, boolean writable, - Object parent) - { - return new FileChannelImpl(fd, path, readable, writable, false, parent); - } - - public static FileChannel open(FileDescriptor fd, String path, - boolean readable, boolean writable, boolean direct, Object parent) { return new FileChannelImpl(fd, path, readable, writable, direct, parent); diff -r a6e591e12f12 -r b6d959fae9ef src/java.base/unix/classes/sun/nio/fs/UnixChannelFactory.java --- a/src/java.base/unix/classes/sun/nio/fs/UnixChannelFactory.java Thu Oct 26 10:46:29 2017 -0700 +++ b/src/java.base/unix/classes/sun/nio/fs/UnixChannelFactory.java Thu Oct 26 11:08:31 2017 -0700 @@ -110,7 +110,7 @@ static FileChannel newFileChannel(int fd, String path, boolean reading, boolean writing) { FileDescriptor fdObj = new FileDescriptor(); fdAccess.set(fdObj, fd); - return FileChannelImpl.open(fdObj, path, reading, writing, null); + return FileChannelImpl.open(fdObj, path, reading, writing, false, null); } /**