Fixed 1597987: NPE in new DaaRule

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4809 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Sven Jacob
2006-11-17 09:08:51 +00:00
parent 7dafa8dba3
commit ea55ca45cd

View File

@ -16,7 +16,7 @@ import javax.swing.tree.DefaultMutableTreeNode;
*/
public class DAAPathFinder {
private static final int MAX_PATHS = 5000;
private static final int MAX_PATH_LENGTH = 5000;
private static final int MAX_PATH_LENGTH = 2000;
private IDataFlowNode rootNode;
private Executable shim;
@ -198,7 +198,9 @@ public class DAAPathFinder {
return;
}
DefaultMutableTreeNode parent = (DefaultMutableTreeNode) last.getParent();
parent.remove(last);
if (parent != null) {
parent.remove(last);
}
last = stack.getLastLeaf();
if (last == null || last.getUserObject() == null) return;