diff --git a/com.ibm.wala.cast/source/java/com/ibm/wala/cast/tree/impl/CAstControlFlowRecorder.java b/com.ibm.wala.cast/source/java/com/ibm/wala/cast/tree/impl/CAstControlFlowRecorder.java index 23b631e6f5..fce10ce945 100644 --- a/com.ibm.wala.cast/source/java/com/ibm/wala/cast/tree/impl/CAstControlFlowRecorder.java +++ b/com.ibm.wala.cast/source/java/com/ibm/wala/cast/tree/impl/CAstControlFlowRecorder.java @@ -100,12 +100,14 @@ public CAstNode getTarget(CAstNode from, Object label) { @Override public Collection getTargetLabels(CAstNode from) { Object node = CAstToNode.get(from); - return labelMap.getOrDefault(node, Collections.emptySet()); + Set found = labelMap.get(node); + return found == null ? Collections.emptySet() : found; } @Override public Set getSourceNodes(CAstNode to) { - return sourceMap.getOrDefault(CAstToNode.get(to), Collections.emptySet()); + Set found = sourceMap.get(CAstToNode.get(to)); + return found == null ? Collections.emptySet() : found; } @Override