Anomaly identified by the detector. Please review whether this anomaly corresponds to a misuse.
Finding:
15
In File:
com/google/javascript/jscomp/ReplaceMessages.java
In Method:
checkNode(Node, int)
Code with Finding:
class ReplaceMessages {
/**
* Checks a node's type.
*
* @throws MalformedException if the node is null or the wrong type
*/
private void checkNode(@Nullable Node node, int type) throws MalformedException {
if (node == null) {
throw new MalformedException(
"Expected node type " + type + "; found: null", node);
}
if (node.getType() != type) {
throw new MalformedException(
"Expected node type " + type + "; found: " + node.getType(), node);
}
}
}