From 35319aa33df43f7e7add63356898b006b01b3d86 Mon Sep 17 00:00:00 2001 From: Lee Date: Thu, 20 Feb 2020 21:09:59 +0000 Subject: [PATCH] Remove uneccessary filter. --- .../op4rewriters/InstanceofMatchTidyingRewriter.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/org/benf/cfr/reader/bytecode/analysis/opgraph/op4rewriters/InstanceofMatchTidyingRewriter.java b/src/org/benf/cfr/reader/bytecode/analysis/opgraph/op4rewriters/InstanceofMatchTidyingRewriter.java index 242d9518b..f8e5d7e61 100644 --- a/src/org/benf/cfr/reader/bytecode/analysis/opgraph/op4rewriters/InstanceofMatchTidyingRewriter.java +++ b/src/org/benf/cfr/reader/bytecode/analysis/opgraph/op4rewriters/InstanceofMatchTidyingRewriter.java @@ -38,11 +38,7 @@ public static void rewrite(Op04StructuredStatement block) { private void doRewrite(Op04StructuredStatement block) { ExpressionRewriterTransformer et = new SearchPass(new SearchPassRewriter()); et.transform(block); - Set localsKeep = SetFactory.newSet(); - for (Map.Entry entry : locals.entrySet()) { - if (entry.getValue() > 0) localsKeep.add(entry.getKey()); - } - removeCandidates.removeAll(localsKeep); + removeCandidates.removeAll(locals.keySet()); //noinspection SuspiciousMethodCalls removeCandidates.retainAll(definitions.keySet()); if (removeCandidates.isEmpty()) return;