mirror of
https://github.com/corda/corda.git
synced 2025-01-09 06:23:04 +00:00
fix FileInputStream for newer openjdk7 versions
This commit is contained in:
parent
1dc932618f
commit
9a899a2e4a
@ -2004,8 +2004,13 @@ interceptFileOperations(Thread* t, bool updateRuntimeData)
|
|||||||
intercept(t, fileInputStreamClass, "open", "(Ljava/lang/String;)V",
|
intercept(t, fileInputStreamClass, "open", "(Ljava/lang/String;)V",
|
||||||
voidPointer(openFile), updateRuntimeData);
|
voidPointer(openFile), updateRuntimeData);
|
||||||
|
|
||||||
|
if(findMethodOrNull(t, fileInputStreamClass, "read0", "()I") != 0) {
|
||||||
|
intercept(t, fileInputStreamClass, "read0", "()I",
|
||||||
|
voidPointer(readByteFromFile), updateRuntimeData);
|
||||||
|
} else {
|
||||||
intercept(t, fileInputStreamClass, "read", "()I",
|
intercept(t, fileInputStreamClass, "read", "()I",
|
||||||
voidPointer(readByteFromFile), updateRuntimeData);
|
voidPointer(readByteFromFile), updateRuntimeData);
|
||||||
|
}
|
||||||
|
|
||||||
intercept(t, fileInputStreamClass, "readBytes", "([BII)I",
|
intercept(t, fileInputStreamClass, "readBytes", "([BII)I",
|
||||||
voidPointer(readBytesFromFile), updateRuntimeData);
|
voidPointer(readBytesFromFile), updateRuntimeData);
|
||||||
|
Loading…
Reference in New Issue
Block a user