src/jdk.jfr/share/classes/jdk/jfr/consumer/EventStream.java
branchJEP-349-branch
changeset 57717 4ce66d271065
parent 57690 9316d02dd4a5
child 57780 d8a436dfa041
equal deleted inserted replaced
57702:c75c241c492a 57717:4ce66d271065
    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>