more correct diagnostic
authorAlexey Kudravtsev <cdr@intellij.com>
Tue, 11 Aug 2020 10:13:46 +0000 (13:13 +0300)
committerintellij-monorepo-bot <intellij-monorepo-bot-no-reply@jetbrains.com>
Wed, 12 Aug 2020 15:27:12 +0000 (15:27 +0000)
GitOrigin-RevId: 490a9a13c4886f21f9e6f0cd5b9e72081a97b39b

platform/platform-impl/src/com/intellij/openapi/vfs/impl/VirtualFilePointerImpl.java

index dedba8d251194630536e6e5ef0211fcbd75ed5cb..b05fb5d8be5e73969c09813bab3cbc27975fb4fe 100644 (file)
@@ -102,6 +102,7 @@ class VirtualFilePointerImpl extends TraceableDisposable implements VirtualFileP
 
   public void dispose() {
     VirtualFilePointerManager pointerManager = VirtualFilePointerManager.getInstance();
+    String url = TRACE_CREATION ? getUrl() : "?";
     boolean shouldKill;
     if (pointerManager instanceof VirtualFilePointerManagerImpl) {
       shouldKill = ((VirtualFilePointerManagerImpl)pointerManager).decrementUsageCount(this);
@@ -111,7 +112,7 @@ class VirtualFilePointerImpl extends TraceableDisposable implements VirtualFileP
     }
 
     if (shouldKill) {
-      kill("URL when die: " + this);
+      kill("URL when die: " + url);
     }
   }