--- old/src/share/native/java/io/io_util.c 2013-03-08 17:07:59.161629580 -0800 +++ new/src/share/native/java/io/io_util.c 2013-03-08 17:07:59.029629584 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -47,10 +47,8 @@ nread = IO_Read(fd, &ret, 1); if (nread == 0) { /* EOF */ return -1; - } else if (nread == JVM_IO_ERR) { /* error */ + } else if (nread == -1) { /* error */ JNU_ThrowIOExceptionWithLastError(env, "Read error"); - } else if (nread == JVM_IO_INTR) { - JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL); } return ret & 0xFF; } @@ -111,10 +109,8 @@ nread = IO_Read(fd, buf, len); if (nread > 0) { (*env)->SetByteArrayRegion(env, bytes, off, nread, (jbyte *)buf); - } else if (nread == JVM_IO_ERR) { + } else if (nread == -1) { JNU_ThrowIOExceptionWithLastError(env, "Read error"); - } else if (nread == JVM_IO_INTR) { - JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL); } else { /* EOF */ nread = -1; } @@ -141,10 +137,8 @@ } else { n = IO_Write(fd, &c, 1); } - if (n == JVM_IO_ERR) { + if (n == -1) { JNU_ThrowIOExceptionWithLastError(env, "Write error"); - } else if (n == JVM_IO_INTR) { - JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL); } } @@ -194,12 +188,9 @@ } else { n = IO_Write(fd, buf+off, len); } - if (n == JVM_IO_ERR) { + if (n == -1) { JNU_ThrowIOExceptionWithLastError(env, "Write error"); break; - } else if (n == JVM_IO_INTR) { - JNU_ThrowByName(env, "java/io/InterruptedIOException", NULL); - break; } off += n; len -= n; @@ -214,11 +205,11 @@ throwFileNotFoundException(JNIEnv *env, jstring path) { char buf[256]; - jint n; + size_t n; jobject x; jstring why = NULL; - n = JVM_GetLastErrorString(buf, sizeof(buf)); + n = getLastErrorString(buf, sizeof(buf)); if (n > 0) { why = JNU_NewStringPlatform(env, buf); }