--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/SecuritySupport.java Mon Oct 28 18:43:04 2019 +0100
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/SecuritySupport.java Mon Oct 28 18:43:54 2019 +0100
@@ -474,16 +474,16 @@
@Override
public String getAbsolutePath(File f) throws IOException {
- return doPrivilegedIOWithReturn( () ->f.getAbsolutePath());
+ return doPrivilegedIOWithReturn( () -> f.getAbsolutePath());
}
@Override
public long length(File f) throws IOException {
- return doPrivilegedIOWithReturn( () ->f.length());
+ return doPrivilegedIOWithReturn( () -> f.length());
}
@Override
public long fileSize(Path p) throws IOException {
- return doPrivilegedIOWithReturn( () ->Files.size(p));
+ return doPrivilegedIOWithReturn( () -> Files.size(p));
}
}
--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/RecordingInput.java Mon Oct 28 18:43:04 2019 +0100
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/RecordingInput.java Mon Oct 28 18:43:54 2019 +0100
@@ -88,7 +88,7 @@
this.currentBlock.reset();
previousBlock.reset();
if (fileAccess.length(f) < 8) {
- throw new IOException("Not a valid Flight Recorder file. File length is only " + f.length() + " bytes.");
+ throw new IOException("Not a valid Flight Recorder file. File length is only " + fileAccess.length(f) + " bytes.");
}
}
--- a/test/jdk/jdk/jfr/api/consumer/security/TestStreamingLocal.java Mon Oct 28 18:43:04 2019 +0100
+++ b/test/jdk/jdk/jfr/api/consumer/security/TestStreamingLocal.java Mon Oct 28 18:43:54 2019 +0100
@@ -51,6 +51,10 @@
// Enable JVM event, no write permission needed
r.enable(EventNames.JVMInformation);
r.start();
+ try (Recording r2 = new Recording()){
+ r2.start();
+ r2.stop();
+ }
r.stop();
try (EventStream es = EventStream.openRepository()) {
es.setStartTime(Instant.EPOCH);