6988037: fileClose prints debug message is close fails
authoralanb
Thu, 30 Sep 2010 14:48:25 +0100
changeset 6690 49644ab3ef0c
parent 6683 5920fb9d1ebe
child 6691 7e7d18be1370
6988037: fileClose prints debug message is close fails Reviewed-by: kevinw, forax
jdk/src/solaris/native/java/io/io_util_md.c
jdk/src/windows/native/java/io/io_util_md.c
--- a/jdk/src/solaris/native/java/io/io_util_md.c	Sat Sep 25 12:00:05 2010 -0700
+++ b/jdk/src/solaris/native/java/io/io_util_md.c	Thu Sep 30 14:48:25 2010 +0100
@@ -83,8 +83,6 @@
             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");
     }
 }
--- a/jdk/src/windows/native/java/io/io_util_md.c	Sat Sep 25 12:00:05 2010 -0700
+++ b/jdk/src/windows/native/java/io/io_util_md.c	Thu Sep 30 14:48:25 2010 +0100
@@ -531,7 +531,6 @@
     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;