8204663: clean up remaining native parts after JDK-8187631
Reviewed-by: rriggs, psandoz
This commit is contained in:
parent
0e39fb9304
commit
4d84004591
src/java.base
unix/native/libjava
windows/native/libjava
@ -70,7 +70,3 @@ Java_java_io_FileOutputStream_writeBytes(JNIEnv *env,
|
|||||||
writeBytes(env, this, bytes, off, len, append, fos_fd);
|
writeBytes(env, this, bytes, off, len, append, fos_fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JNICALL
|
|
||||||
Java_java_io_FileOutputStream_close0(JNIEnv *env, jobject this) {
|
|
||||||
fileClose(env, this, fos_fd);
|
|
||||||
}
|
|
||||||
|
@ -121,16 +121,6 @@ fileOpen(JNIEnv *env, jobject this, jstring path, jfieldID fid, int flags)
|
|||||||
} END_PLATFORM_STRING(env, ps);
|
} END_PLATFORM_STRING(env, ps);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
fileClose(JNIEnv *env, jobject this, jfieldID fid)
|
|
||||||
{
|
|
||||||
jobject fileDescriptor = (*env)->GetObjectField(env, (this), (fid));
|
|
||||||
if (fileDescriptor == NULL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fileDescriptorClose(env, fileDescriptor);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Function to close the fd held by this FileDescriptor and set fd to -1.
|
// Function to close the fd held by this FileDescriptor and set fd to -1.
|
||||||
void
|
void
|
||||||
fileDescriptorClose(JNIEnv *env, jobject this)
|
fileDescriptorClose(JNIEnv *env, jobject this)
|
||||||
|
@ -99,10 +99,6 @@ FD handleOpen(const char *path, int oflag, int mode);
|
|||||||
} while((_result == -1) && (errno == EINTR)); \
|
} while((_result == -1) && (errno == EINTR)); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
/*
|
|
||||||
* IO helper function(s)
|
|
||||||
*/
|
|
||||||
void fileClose(JNIEnv *env, jobject this, jfieldID fid);
|
|
||||||
void fileDescriptorClose(JNIEnv *env, jobject this);
|
void fileDescriptorClose(JNIEnv *env, jobject this);
|
||||||
|
|
||||||
#ifdef MACOSX
|
#ifdef MACOSX
|
||||||
|
@ -72,7 +72,3 @@ Java_java_io_FileOutputStream_writeBytes(JNIEnv *env,
|
|||||||
writeBytes(env, this, bytes, off, len, append, fos_fd);
|
writeBytes(env, this, bytes, off, len, append, fos_fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT void JNICALL
|
|
||||||
Java_java_io_FileOutputStream_close0(JNIEnv *env, jobject this) {
|
|
||||||
handleClose(env, this, fos_fd);
|
|
||||||
}
|
|
||||||
|
@ -535,16 +535,6 @@ jint handleAppend(FD fd, const void *buf, jint len) {
|
|||||||
return writeInternal(fd, buf, len, JNI_TRUE);
|
return writeInternal(fd, buf, len, JNI_TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
handleClose(JNIEnv *env, jobject this, jfieldID fid)
|
|
||||||
{
|
|
||||||
jobject fileDescriptor = (*env)->GetObjectField(env, (this), (fid));
|
|
||||||
if (fileDescriptor == NULL) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
fileDescriptorClose(env, fileDescriptor);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Function to close the fd held by this FileDescriptor and set fd to -1.
|
// Function to close the fd held by this FileDescriptor and set fd to -1.
|
||||||
void
|
void
|
||||||
fileDescriptorClose(JNIEnv *env, jobject this)
|
fileDescriptorClose(JNIEnv *env, jobject this)
|
||||||
|
@ -48,7 +48,6 @@ jlong handleGetLength(FD fd);
|
|||||||
JNIEXPORT jint handleRead(FD fd, void *buf, jint len);
|
JNIEXPORT jint handleRead(FD fd, void *buf, jint len);
|
||||||
jint handleWrite(FD fd, const void *buf, jint len);
|
jint handleWrite(FD fd, const void *buf, jint len);
|
||||||
jint handleAppend(FD fd, const void *buf, jint len);
|
jint handleAppend(FD fd, const void *buf, jint len);
|
||||||
void handleClose(JNIEnv *env, jobject this, jfieldID fid);
|
|
||||||
void fileDescriptorClose(JNIEnv *env, jobject this);
|
void fileDescriptorClose(JNIEnv *env, jobject this);
|
||||||
JNIEXPORT jlong JNICALL
|
JNIEXPORT jlong JNICALL
|
||||||
handleLseek(FD fd, jlong offset, jint whence);
|
handleLseek(FD fd, jlong offset, jint whence);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user