From 8e60a505a80359919e95847306901ac85c6c5303 Mon Sep 17 00:00:00 2001 From: alanb Date: Thu, 30 Sep 2010 14:48:25 +0100 Subject: [PATCH] 6988037: fileClose prints debug message is close fails Reviewed-by: kevinw, forax --- jdk/src/solaris/native/java/io/io_util_md.c | 4 +--- jdk/src/windows/native/java/io/io_util_md.c | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/jdk/src/solaris/native/java/io/io_util_md.c b/jdk/src/solaris/native/java/io/io_util_md.c index 6379acfe16..eb27ff2679 100644 --- a/jdk/src/solaris/native/java/io/io_util_md.c +++ b/jdk/src/solaris/native/java/io/io_util_md.c @@ -83,8 +83,6 @@ fileClose(JNIEnv *env, jobject this, jfieldID fid) close(devnull); } } else if (JVM_Close(fd) == -1) { - SET_FD(this, fd, fid); // restore fd - printf("JVM_Close returned -1\n"); - JNU_ThrowIOExceptionWithLastError(env, "close failed"); + JNU_ThrowIOExceptionWithLastError(env, "close failed"); } } diff --git a/jdk/src/windows/native/java/io/io_util_md.c b/jdk/src/windows/native/java/io/io_util_md.c index 93e154cd63..f5b9723a74 100644 --- a/jdk/src/windows/native/java/io/io_util_md.c +++ b/jdk/src/windows/native/java/io/io_util_md.c @@ -531,7 +531,6 @@ handleClose(JNIEnv *env, jobject this, jfieldID fid) SET_FD(this, -1, fid); if (CloseHandle(h) == 0) { /* Returns zero on failure */ - SET_FD(this, fd, fid); // restore fd JNU_ThrowIOExceptionWithLastError(env, "close failed"); } return 0; -- GitLab