--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/SecuritySupport.java Sat Oct 26 23:59:51 2019 +0200
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/SecuritySupport.java Mon Oct 28 17:33:38 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 Sat Oct 26 23:59:51 2019 +0200
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/RecordingInput.java Mon Oct 28 17:33:38 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 Sat Oct 26 23:59:51 2019 +0200
+++ b/test/jdk/jdk/jfr/api/consumer/security/TestStreamingLocal.java Mon Oct 28 17:33:38 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);