OpenJDK / jdk-updates / jdk12u
changeset 47460:b6d959fae9ef
8189963: Remove version of FileChannelImpl::open without the 'direct' parameter
Summary: Remove old version of FileChannelImpl::open and update call sites
Reviewed-by: rriggs
author | bpb |
---|---|
date | Thu, 26 Oct 2017 11:08:31 -0700 |
parents | a6e591e12f12 |
children | 60a5d9c77c4c |
files | src/java.base/share/classes/java/io/FileInputStream.java src/java.base/share/classes/java/io/FileOutputStream.java src/java.base/share/classes/java/io/RandomAccessFile.java src/java.base/share/classes/sun/nio/ch/FileChannelImpl.java src/java.base/unix/classes/sun/nio/fs/UnixChannelFactory.java |
diffstat | 5 files changed, 7 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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
--- 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();
--- 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);
--- 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); } /**