Changeset 373 for trunk/openjdk/jdk/src/share
- Timestamp:
- May 31, 2012, 5:49:53 PM (13 years ago)
- Location:
- trunk/openjdk/jdk/src/share/native/java/io
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/openjdk/jdk/src/share/native/java/io/FileInputStream.c
r278 r373 78 78 jlong end = jlong_zero; 79 79 FD fd = GET_FD(this, fis_fd); 80 if ( fd == -1) {80 if (!VALID_FD(fd)) { 81 81 JNU_ThrowIOException (env, "Stream Closed"); 82 82 return 0; … … 94 94 jlong ret; 95 95 FD fd = GET_FD(this, fis_fd); 96 if ( fd == -1) {96 if (!VALID_FD(fd)) { 97 97 JNU_ThrowIOException (env, "Stream Closed"); 98 98 return 0; -
trunk/openjdk/jdk/src/share/native/java/io/RandomAccessFile.c
r278 r373 91 91 jlong ret; 92 92 93 fd = GET_FD(this, raf_fd);94 if ( fd == -1) {93 ASSIGN_FD(fd, this, raf_fd); 94 if (!VALID_FD(fd)) { 95 95 JNU_ThrowIOException(env, "Stream Closed"); 96 96 return -1; … … 108 108 jlong end = jlong_zero; 109 109 110 fd = GET_FD(this, raf_fd);111 if ( fd == -1) {110 ASSIGN_FD(fd, this, raf_fd); 111 if (!VALID_FD(fd)) { 112 112 JNU_ThrowIOException(env, "Stream Closed"); 113 113 return -1; … … 129 129 FD fd; 130 130 131 fd = GET_FD(this, raf_fd);132 if ( fd == -1) {131 ASSIGN_FD(fd, this, raf_fd); 132 if (!VALID_FD(fd)) { 133 133 JNU_ThrowIOException(env, "Stream Closed"); 134 134 return; … … 148 148 jlong cur; 149 149 150 fd = GET_FD(this, raf_fd);151 if ( fd == -1) {150 ASSIGN_FD(fd, this, raf_fd); 151 if (!VALID_FD(fd)) { 152 152 JNU_ThrowIOException(env, "Stream Closed"); 153 153 return; -
trunk/openjdk/jdk/src/share/native/java/io/io_util.c
r278 r373 41 41 char ret; 42 42 FD fd = GET_FD(this, fid); 43 if ( fd == -1) {43 if (!VALID_FD(fd)) { 44 44 JNU_ThrowIOException(env, "Stream Closed"); 45 45 return -1; … … 104 104 } 105 105 106 fd = GET_FD(this, fid);107 if ( fd == -1) {106 ASSIGN_FD(fd, this, fid); 107 if (!VALID_FD(fd)) { 108 108 JNU_ThrowIOException(env, "Stream Closed"); 109 109 nread = -1; … … 133 133 jint n; 134 134 FD fd = GET_FD(this, fid); 135 if ( fd == -1) {135 if (!VALID_FD(fd)) { 136 136 JNU_ThrowIOException(env, "Stream Closed"); 137 137 return; … … 181 181 off = 0; 182 182 while (len > 0) { 183 fd = GET_FD(this, fid);184 if ( fd == -1) {183 ASSIGN_FD(fd, this, fid); 184 if (!VALID_FD(fd)) { 185 185 JNU_ThrowIOException(env, "Stream Closed"); 186 186 break;
Note:
See TracChangeset
for help on using the changeset viewer.