瀏覽代碼

Add additional warning

Fabio Battaglia 4 年之前
父節點
當前提交
e181c73ddb
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/main/java/info/hkzlab/dupal/analyzer/palanalisys/graph/PathFinder.java

+ 4 - 1
src/main/java/info/hkzlab/dupal/analyzer/palanalisys/graph/PathFinder.java

@@ -36,7 +36,10 @@ public class PathFinder {
            GraphLink[] stateLinks = currentState.getLinks(); // Get links present in the current state
 
             for(int idx = 0; idx < stateLinks.length; idx++) { // For every link...
-                if(stateLinks[idx] == null) continue;
+                if(stateLinks[idx] == null) {
+                    logger.warn("findPathToState() -> null link " + idx + " for state " + currentState);
+                    continue;
+                }
 
                 if(!pathMap.containsKey(stateLinks[idx].getDestinationState().hashCode())) { // If it's not leading somewhere we've already visited or we've already put in our path map
                     ArrayList<GraphLink> statePath = (ArrayList<GraphLink>)linkStack.clone(); // Copy the path to the current state