src/jdk.jfr/share/classes/jdk/jfr/internal/Repository.java
branchJEP-349-branch
changeset 58249 e17143e28542
parent 57360 5d043a159d5c
parent 58240 046533575954
child 58250 5851f445c684
--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/Repository.java	Thu Sep 19 17:33:18 2019 -0700
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/Repository.java	Sat Sep 21 12:10:52 2019 +0200
@@ -56,7 +56,12 @@
         return instance;
     }
 
-    public synchronized void setBasePath(SafePath baseLocation) throws IOException  {
+    public synchronized void setBasePath(SafePath baseLocation) throws Exception {
+
+        if(baseLocation.equals(this.baseLocation)) {
+            Logger.log(LogTag.JFR, LogLevel.INFO, "Same base repository path " + baseLocation.toString() + " is set");
+            return;
+        }
         // Probe to see if repository can be created, needed for fail fast
         // during JVM startup or JFR.configure
         this.repository = createRepository(baseLocation);