Skip to content

Commit

Permalink
Safety validations
Browse files Browse the repository at this point in the history
  • Loading branch information
jhy committed Jul 11, 2021
1 parent 2dc914f commit 049204c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/org/jsoup/select/NodeTraversor.java
Expand Up @@ -18,6 +18,9 @@ public class NodeTraversor {
* @param root the root node point to traverse.
*/
public static void traverse(NodeVisitor visitor, Node root) {
Validate.notNull(visitor);
Validate.notNull(root);

Node node = root;
Node parent; // remember parent to find nodes that get replaced in .head
int depth = 0;
Expand Down

0 comments on commit 049204c

Please sign in to comment.