src/jdk.jfr/share/classes/jdk/jfr/consumer/RecordingStream.java
branchJEP-349-branch
changeset 57690 9316d02dd4a5
parent 57614 b49f5c13baa7
child 57717 4ce66d271065
--- a/src/jdk.jfr/share/classes/jdk/jfr/consumer/RecordingStream.java	Mon Aug 05 23:57:47 2019 +0200
+++ b/src/jdk.jfr/share/classes/jdk/jfr/consumer/RecordingStream.java	Fri Aug 09 01:18:18 2019 +0200
@@ -41,6 +41,7 @@
 import jdk.jfr.internal.PlatformRecording;
 import jdk.jfr.internal.PrivateAccess;
 import jdk.jfr.internal.Utils;
+import jdk.jfr.internal.consumer.FileAccess;
 
 /**
  * A recording stream produces events from the current JVM (Java Virtual
@@ -99,7 +100,7 @@
         this.recording = new Recording();
         this.recording.setFlushInterval(Duration.ofMillis(1000));
         try {
-            this.stream = new EventDirectoryStream(acc, null, null);
+            this.stream = new EventDirectoryStream(acc, null, FileAccess.PRIVILIGED, true);
         } catch (IOException ioe) {
             throw new IllegalStateException(ioe.getMessage());
         }
@@ -356,4 +357,9 @@
     public void setStartTime(Instant startTime) {
         stream.setStartTime(startTime);
     }
+
+    @Override
+    public void setEndTime(Instant endTime) {
+        stream.setStartTime(endTime);
+    }
 }