Skip to content
Permalink
Browse files

test/jdk/jdk/jfr/event/io/TestFileStreamEvents.java failing

  • Loading branch information
AlanBateman committed Feb 19, 2020
1 parent 31badfc commit 8f5c4b4f85a5a34b6364409365e0924d965cf827
@@ -256,7 +256,11 @@ public int read() throws IOException {
* @throws IOException if an I/O error occurs.
*/
public int read(byte b[]) throws IOException {
return read(b, 0, b.length);
if (Thread.currentThread().isVirtual()) {
return Blocker.managedBlock(() -> readBytes(b, 0, b.length));
} else {
return readBytes(b, 0, b.length);
}
}

/**
@@ -340,7 +340,12 @@ private native void writeBytes(byte b[], int off, int len, boolean append)
* @throws IOException if an I/O error occurs.
*/
public void write(byte b[]) throws IOException {
write(b, 0, b.length);
boolean append = fdAccess.getAppend(fd);
if (Thread.currentThread().isVirtual()) {
Blocker.managedBlock(() -> writeBytes(b, 0, b.length, append));
} else {
writeBytes(b, 0, b.length, append);
}
}

/**

0 comments on commit 8f5c4b4

Please sign in to comment.