src/jdk.jfr/share/classes/jdk/jfr/internal/Repository.java
changeset 58240 046533575954
parent 50745 a390cbb82d47
child 58249 e17143e28542
child 58863 c16ac7a2eba4
equal deleted inserted replaced
58238:3386b9a8ef4d 58240:046533575954
    54     public static Repository getRepository() {
    54     public static Repository getRepository() {
    55         return instance;
    55         return instance;
    56     }
    56     }
    57 
    57 
    58     public synchronized void setBasePath(SafePath baseLocation) throws Exception {
    58     public synchronized void setBasePath(SafePath baseLocation) throws Exception {
       
    59 
       
    60         if(baseLocation.equals(this.baseLocation)) {
       
    61             Logger.log(LogTag.JFR, LogLevel.INFO, "Same base repository path " + baseLocation.toString() + " is set");
       
    62             return;
       
    63         }
    59         // Probe to see if repository can be created, needed for fail fast
    64         // Probe to see if repository can be created, needed for fail fast
    60         // during JVM startup or JFR.configure
    65         // during JVM startup or JFR.configure
    61         this.repository = createRepository(baseLocation);
    66         this.repository = createRepository(baseLocation);
    62         try {
    67         try {
    63             // Remove so we don't "leak" repositories, if JFR is never started
    68             // Remove so we don't "leak" repositories, if JFR is never started