mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
diagnostics
This commit is contained in:
+2
-2
@@ -83,7 +83,7 @@ class VirtualFilePointerImpl extends TraceableDisposable implements VirtualFileP
|
||||
|
||||
private void checkDisposed() {
|
||||
if (isDisposed()) {
|
||||
throwDisposalError("Already disposed: URL=" + getUrlNoUpdate());
|
||||
throwDisposalError("Already disposed: URL='" + this+"'");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ class VirtualFilePointerImpl extends TraceableDisposable implements VirtualFileP
|
||||
public void dispose() {
|
||||
checkDisposed();
|
||||
if (myNode.incrementUsageCount(-1) == 0) {
|
||||
kill(null);
|
||||
kill("URL when die: "+ toString());
|
||||
VirtualFilePointerManager pointerManager = VirtualFilePointerManager.getInstance();
|
||||
if (pointerManager instanceof VirtualFilePointerManagerImpl) {
|
||||
((VirtualFilePointerManagerImpl)pointerManager).removeNode(myNode, myListener); // remove from the tree
|
||||
|
||||
+2
-2
@@ -275,7 +275,7 @@ public class VirtualFilePointerManagerImpl extends VirtualFilePointerManager imp
|
||||
if (!left.isEmpty()) {
|
||||
VirtualFilePointerImpl p = left.get(0).leaf;
|
||||
try {
|
||||
p.throwDisposalError("Not disposed pointer: "+p.getUrlNoUpdate());
|
||||
p.throwDisposalError("Not disposed pointer: "+p);
|
||||
}
|
||||
finally {
|
||||
for (FilePointerPartNode pair : left) {
|
||||
@@ -308,7 +308,7 @@ public class VirtualFilePointerManagerImpl extends VirtualFilePointerManager imp
|
||||
try {
|
||||
for (VirtualFilePointerImpl pointer : pointers) {
|
||||
if (!myStoredPointers.contains(pointer)) {
|
||||
pointer.throwDisposalError("Virtual pointer hasn't been disposed: "+pointer.getUrlNoUpdate());
|
||||
pointer.throwDisposalError("Virtual pointer hasn't been disposed: "+pointer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,9 +34,9 @@ public class TraceableDisposable {
|
||||
CREATE_TRACE = creation;
|
||||
}
|
||||
|
||||
public void kill(@Nullable String msg) {
|
||||
public void kill(@NonNls @Nullable String msg) {
|
||||
if (CREATE_TRACE != null) {
|
||||
KILL_TRACE = new Throwable();
|
||||
KILL_TRACE = new Throwable(msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user