# HG changeset patch # User stuefe # Date 1528693834 -7200 # Mon Jun 11 07:10:34 2018 +0200 # Node ID 6754bca31ba50d0a88cff5b307f05108df80a91d # Parent 65e65d5905bcb3ba994c8a6d20dd2b61deb6f12d [mq]: JDK-8204663-clean-up-after-JDK-8187631 diff --git a/src/java.base/unix/native/libjava/FileOutputStream_md.c b/src/java.base/unix/native/libjava/FileOutputStream_md.c --- a/src/java.base/unix/native/libjava/FileOutputStream_md.c +++ b/src/java.base/unix/native/libjava/FileOutputStream_md.c @@ -70,7 +70,3 @@ writeBytes(env, this, bytes, off, len, append, fos_fd); } -void JNICALL -Java_java_io_FileOutputStream_close0(JNIEnv *env, jobject this) { - fileClose(env, this, fos_fd); -} diff --git a/src/java.base/unix/native/libjava/io_util_md.c b/src/java.base/unix/native/libjava/io_util_md.c --- a/src/java.base/unix/native/libjava/io_util_md.c +++ b/src/java.base/unix/native/libjava/io_util_md.c @@ -121,16 +121,6 @@ } END_PLATFORM_STRING(env, ps); } -void -fileClose(JNIEnv *env, jobject this, jfieldID fid) -{ - jobject fileDescriptor = (*env)->GetObjectField(env, (this), (fid)); - if (fileDescriptor == NULL) { - return; - } - fileDescriptorClose(env, fileDescriptor); -} - // Function to close the fd held by this FileDescriptor and set fd to -1. void fileDescriptorClose(JNIEnv *env, jobject this) diff --git a/src/java.base/unix/native/libjava/io_util_md.h b/src/java.base/unix/native/libjava/io_util_md.h --- a/src/java.base/unix/native/libjava/io_util_md.h +++ b/src/java.base/unix/native/libjava/io_util_md.h @@ -99,10 +99,6 @@ } while((_result == -1) && (errno == EINTR)); \ } while(0) -/* - * IO helper function(s) - */ -void fileClose(JNIEnv *env, jobject this, jfieldID fid); void fileDescriptorClose(JNIEnv *env, jobject this); #ifdef MACOSX diff --git a/src/java.base/windows/native/libjava/FileOutputStream_md.c b/src/java.base/windows/native/libjava/FileOutputStream_md.c --- a/src/java.base/windows/native/libjava/FileOutputStream_md.c +++ b/src/java.base/windows/native/libjava/FileOutputStream_md.c @@ -72,7 +72,3 @@ writeBytes(env, this, bytes, off, len, append, fos_fd); } -JNIEXPORT void JNICALL -Java_java_io_FileOutputStream_close0(JNIEnv *env, jobject this) { - handleClose(env, this, fos_fd); -} diff --git a/src/java.base/windows/native/libjava/io_util_md.c b/src/java.base/windows/native/libjava/io_util_md.c --- a/src/java.base/windows/native/libjava/io_util_md.c +++ b/src/java.base/windows/native/libjava/io_util_md.c @@ -535,16 +535,6 @@ return writeInternal(fd, buf, len, JNI_TRUE); } -void -handleClose(JNIEnv *env, jobject this, jfieldID fid) -{ - jobject fileDescriptor = (*env)->GetObjectField(env, (this), (fid)); - if (fileDescriptor == NULL) { - return; - } - fileDescriptorClose(env, fileDescriptor); -} - // Function to close the fd held by this FileDescriptor and set fd to -1. void fileDescriptorClose(JNIEnv *env, jobject this) diff --git a/src/java.base/windows/native/libjava/io_util_md.h b/src/java.base/windows/native/libjava/io_util_md.h --- a/src/java.base/windows/native/libjava/io_util_md.h +++ b/src/java.base/windows/native/libjava/io_util_md.h @@ -48,7 +48,6 @@ JNIEXPORT jint handleRead(FD fd, void *buf, jint len); jint handleWrite(FD fd, const void *buf, jint len); jint handleAppend(FD fd, const void *buf, jint len); -void handleClose(JNIEnv *env, jobject this, jfieldID fid); void fileDescriptorClose(JNIEnv *env, jobject this); JNIEXPORT jlong JNICALL handleLseek(FD fd, jlong offset, jint whence);