diff --git a/src/windows/native/sun/nio/ch/FileDispatcherImpl.c b/src/windows/native/sun/nio/ch/FileDispatcherImpl.c index 850d8adec9eac414abd67c3cd7d1bec3d8719273..753725f0dad021286e85bb2124073b948aa18c32 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);