equal
deleted
inserted
replaced
32 import java.time.Duration; |
32 import java.time.Duration; |
33 import java.time.Instant; |
33 import java.time.Instant; |
34 import java.util.Objects; |
34 import java.util.Objects; |
35 import java.util.function.Consumer; |
35 import java.util.function.Consumer; |
36 |
36 |
|
37 import jdk.jfr.internal.SecuritySupport; |
37 import jdk.jfr.internal.Utils; |
38 import jdk.jfr.internal.Utils; |
38 import jdk.jfr.internal.consumer.FileAccess; |
39 import jdk.jfr.internal.consumer.FileAccess; |
39 |
40 |
40 /** |
41 /** |
41 * Represents a stream of events. |
42 * Represents a stream of events. |
58 * does not have |
59 * does not have |
59 * {@code FlightRecorderPermission("accessFlightRecorder")} |
60 * {@code FlightRecorderPermission("accessFlightRecorder")} |
60 */ |
61 */ |
61 public static EventStream openRepository() throws IOException { |
62 public static EventStream openRepository() throws IOException { |
62 Utils.checkAccessFlightRecorder(); |
63 Utils.checkAccessFlightRecorder(); |
63 return new EventDirectoryStream(AccessController.getContext(), null, FileAccess.PRIVILIGED, false); |
64 return new EventDirectoryStream(AccessController.getContext(), null, SecuritySupport.PRIVILIGED, false); |
64 } |
65 } |
65 |
66 |
66 /** |
67 /** |
67 * Creates an event stream from a disk repository. |
68 * Creates an event stream from a disk repository. |
68 * <p> |
69 * <p> |