From eaca4f6eb5c3ca3d78beda757fda4d1fecb73978 Mon Sep 17 00:00:00 2001 From: prappo Date: Fri, 21 Oct 2016 12:31:50 +0100 Subject: [PATCH] 8168417: Pending exceptions in java.base/windows/native/libnio Reviewed-by: chegar, alanb --- src/windows/native/sun/nio/ch/FileDispatcherImpl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/windows/native/sun/nio/ch/FileDispatcherImpl.c b/src/windows/native/sun/nio/ch/FileDispatcherImpl.c index 850d8adec..753725f0d 100644 --- a/src/windows/native/sun/nio/ch/FileDispatcherImpl.c +++ b/src/windows/native/sun/nio/ch/FileDispatcherImpl.c @@ -210,6 +210,7 @@ Java_sun_nio_ch_FileDispatcherImpl_write0(JNIEnv *env, jclass clazz, jobject fdo if ((h == INVALID_HANDLE_VALUE) || (result == 0)) { JNU_ThrowIOExceptionWithLastError(env, "Write failed"); + return IOS_THROWN; } return convertReturnVal(env, (jint)written, JNI_FALSE); @@ -258,6 +259,7 @@ Java_sun_nio_ch_FileDispatcherImpl_writev0(JNIEnv *env, jclass clazz, jobject fd if ((h == INVALID_HANDLE_VALUE) || (result == 0)) { JNU_ThrowIOExceptionWithLastError(env, "Write failed"); + return IOS_THROWN; } return convertLongReturnVal(env, totalWritten, JNI_FALSE); -- GitLab