Ignore the NPE which happens when dropping a rocket component as the
last component in the previous child element. I can't seem to find a better solution than to just eat the npe.
This commit is contained in:
parent
c2d8314282
commit
cbb9a48435
@ -402,6 +402,24 @@ public class SwingExceptionHandler implements Thread.UncaughtExceptionHandler, E
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Detect and ignore DnD bug in component tree - related to 6560955 in Sun JRE.
|
||||
*/
|
||||
if (t instanceof NullPointerException) {
|
||||
StackTraceElement[] trace = t.getStackTrace();
|
||||
|
||||
if (trace.length > 2 &&
|
||||
trace[0].getClassName().equals("javax.swing.tree.TreePath") &&
|
||||
trace[0].getMethodName().equals("pathByAddingChild") &&
|
||||
|
||||
trace[1].getClassName().equals("javax.swing.plaf.basic.BasicTreeUI") &&
|
||||
trace[1].getMethodName().equals("getDropLineRect")) {
|
||||
|
||||
log.warn("Ignoring Sun JRE bug updating drop location " +
|
||||
"(see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6560955): " + t);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user