public Node(String id) {
super();
this.id = id;
- this.links = new ArrayList<Node>();
+ this.links = new ArrayList<>();
}
public List<Node> getLinks() {
}
public DeadlockDetectionUtil() {
- this.nodeList = new HashMap<String, Node>();
+ this.nodeList = new HashMap<>();
}
public void listAllNodes() {
currentNode = nodeList.get("o" + owner);
}
- boolean cycle = findCycle(currentNode);
- return cycle;
+ return findCycle(currentNode);
}
private boolean findCycle(Node currentNode) {