Merge JEP-349-branch
authormgronlun
Mon, 28 Oct 2019 18:43:54 +0100
branchJEP-349-branch
changeset 58824 13921e9e3cac
parent 58823 6a21dba79b81 (current diff)
parent 58820 8412a437a4bc (diff)
child 58826 fb51e2ae730e
Merge
--- 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);