From 4e3c5f3d4df00fbe8d1861904a4507061bc81769 Mon Sep 17 00:00:00 2001 From: Graham Date: Sun, 25 Aug 2019 15:26:52 +0100 Subject: [PATCH] Remove use of deprecated getChildNodesByType method --- .../src/main/java/dev/openrs2/deob/ast/util/ExprUtils.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deob-ast/src/main/java/dev/openrs2/deob/ast/util/ExprUtils.java b/deob-ast/src/main/java/dev/openrs2/deob/ast/util/ExprUtils.java index 10650924..6307a957 100644 --- a/deob-ast/src/main/java/dev/openrs2/deob/ast/util/ExprUtils.java +++ b/deob-ast/src/main/java/dev/openrs2/deob/ast/util/ExprUtils.java @@ -80,8 +80,10 @@ public final class ExprUtils { count++; } - for (Expression child : expr.getChildNodesByType(Expression.class)) { - count += countNots(child); + for (Expression child : expr.findAll(Expression.class)) { + if (child != expr) { + count += countNots(child); + } } return count;