--- a/src/java.base/windows/native/libjava/FileDescriptor_md.c Fri Feb 23 10:49:56 2018 -0800
+++ b/src/java.base/windows/native/libjava/FileDescriptor_md.c Fri Feb 23 14:26:29 2018 -0500
@@ -56,11 +56,6 @@
CHECK_NULL(IO_append_fdID = (*env)->GetFieldID(env, fdClass, "append", "Z"));
}
-JNIEXPORT jlong JNICALL
-Java_java_io_FileDescriptor_getHandle(JNIEnv *env, jclass fdClass, jint fd) {
- SET_HANDLE(fd);
-}
-
/**************************************************************
* File Descriptor
*/
@@ -73,13 +68,14 @@
}
}
-JNIEXPORT void JNICALL
-Java_java_io_FileDescriptor_cleanupClose0(JNIEnv *env, jclass fdClass, jlong handle) {
- if (handle != -1) {
- if (CloseHandle((HANDLE)handle) == -1) {
- JNU_ThrowIOExceptionWithLastError(env, "close failed");
- }
- }
+JNIEXPORT jlong JNICALL
+Java_java_io_FileDescriptor_getHandle(JNIEnv *env, jclass fdClass, jint fd) {
+ SET_HANDLE(fd);
+}
+
+JNIEXPORT jboolean JNICALL
+Java_java_io_FileDescriptor_getAppend(JNIEnv *env, jclass fdClass, jint fd) {
+ return JNI_FALSE;
}
// instance method close0 for FileDescriptor
@@ -87,3 +83,12 @@
Java_java_io_FileDescriptor_close0(JNIEnv *env, jobject this) {
fileDescriptorClose(env, this);
}
+
+JNIEXPORT void JNICALL
+Java_java_io_FileCleanable_cleanupClose0(JNIEnv *env, jclass fdClass, jint unused, jlong handle) {
+ if (handle != -1) {
+ if (CloseHandle((HANDLE)handle) == -1) {
+ JNU_ThrowIOExceptionWithLastError(env, "close failed");
+ }
+ }
+}