changeset 15886:008918f18c5f

8168417: Pending exceptions in java.base/windows/native/libnio Reviewed-by: chegar, alanb
author prappo
date Fri, 21 Oct 2016 12:31:50 +0100
parents 160db4882087
children 4b87b12bd992 2a8c7d5443b1
files src/java.base/windows/native/libnio/ch/FileDispatcherImpl.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/windows/native/libnio/ch/FileDispatcherImpl.c	Fri Oct 21 14:52:04 2016 +0530
+++ b/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);