8188135: Fix VS 2010 build after "8187631: Refactor FileDescriptor close implementation"
authorgoetz
Fri, 29 Sep 2017 10:00:58 +0200
changeset 47289 6439a2eca58b
parent 47288 9ca862331fb4
child 47290 2853531b2c8c
8188135: Fix VS 2010 build after "8187631: Refactor FileDescriptor close implementation" Reviewed-by: dholmes, alanb
src/java.base/windows/native/libjava/io_util_md.c
--- a/src/java.base/windows/native/libjava/io_util_md.c	Fri Sep 29 00:52:30 2017 +0000
+++ b/src/java.base/windows/native/libjava/io_util_md.c	Fri Sep 29 10:00:58 2017 +0200
@@ -550,10 +550,10 @@
 fileDescriptorClose(JNIEnv *env, jobject this)
 {
     FD fd = (*env)->GetLongField(env, this, IO_handle_fdID);
+    HANDLE h = (HANDLE)fd;
     if ((*env)->ExceptionOccurred(env)) {
         return;
     }
-    HANDLE h = (HANDLE)fd;
 
     if (h == INVALID_HANDLE_VALUE) {
         return;