src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecording.java
changeset 58480 8ca46e186a63
parent 55378 bd613b97c7c8
child 58495 465ba4fefe62
child 58679 9c3209ff7550
child 58863 c16ac7a2eba4
equal deleted inserted replaced
58479:35ce0ad5870a 58480:8ca46e186a63
   364         }
   364         }
   365     }
   365     }
   366 
   366 
   367     public void setDestination(WriteableUserPath userSuppliedPath) throws IOException {
   367     public void setDestination(WriteableUserPath userSuppliedPath) throws IOException {
   368         synchronized (recorder) {
   368         synchronized (recorder) {
       
   369             checkSetDestination(userSuppliedPath);
       
   370             this.destination = userSuppliedPath;
       
   371         }
       
   372     }
       
   373 
       
   374     public void checkSetDestination(WriteableUserPath userSuppliedPath) throws IOException {
       
   375         synchronized (recorder) {
   369             if (Utils.isState(getState(), RecordingState.STOPPED, RecordingState.CLOSED)) {
   376             if (Utils.isState(getState(), RecordingState.STOPPED, RecordingState.CLOSED)) {
   370                 throw new IllegalStateException("Destination can't be set on a recording that has been stopped/closed");
   377                 throw new IllegalStateException("Destination can't be set on a recording that has been stopped/closed");
   371             }
   378             }
   372             this.destination = userSuppliedPath;
       
   373         }
   379         }
   374     }
   380     }
   375 
   381 
   376     public WriteableUserPath getDestination() {
   382     public WriteableUserPath getDestination() {
   377         synchronized (recorder) {
   383         synchronized (recorder) {