8168417: Pending exceptions in java.base/windows/native/libnio
authorprappo
Fri, 21 Oct 2016 12:31:50 +0100
changeset 41601 d04193dcb0f7
parent 41600 5abb663b1ca4
child 41602 56443be12e8e
child 41603 bb9d97b4c21b
8168417: Pending exceptions in java.base/windows/native/libnio Reviewed-by: chegar, alanb
jdk/src/java.base/windows/native/libnio/ch/FileDispatcherImpl.c
--- a/jdk/src/java.base/windows/native/libnio/ch/FileDispatcherImpl.c	Fri Oct 21 14:52:04 2016 +0530
+++ b/jdk/src/java.base/windows/native/libnio/ch/FileDispatcherImpl.c	Fri Oct 21 12:31:50 2016 +0100
@@ -202,6 +202,7 @@
 
     if ((h == INVALID_HANDLE_VALUE) || (result == 0)) {
         JNU_ThrowIOExceptionWithLastError(env, "Write failed");
+        return IOS_THROWN;
     }
 
     return convertReturnVal(env, (jint)written, JNI_FALSE);
@@ -250,6 +251,7 @@
 
     if ((h == INVALID_HANDLE_VALUE) || (result == 0)) {
         JNU_ThrowIOExceptionWithLastError(env, "Write failed");
+        return IOS_THROWN;
     }
 
     return convertLongReturnVal(env, totalWritten, JNI_FALSE);