dlcheck
dlcheck copied to clipboard
Fix NPE
If method LockGraph.shortestPath returns null, it's lead to NPE in method LockGraph.publishPotentialDeadlockIfNeeded.
Have this NPE occurred? The LockGraph.shortestPath method is called only if a cycle is detected, so it cannot return null. Maybe changing "return null" to "throw new IllegalStateException(...)" is a better solution.
Yes.
Finally I reproduce this error again: https://gist.github.com/vektory79/34ec4225ada199d67bd40b034300b8fa
dlcheck.log looks lake: https://gist.github.com/vektory79/d70a87b25da7b3d27ca79fc2fc44d3b9