Skip to content

Commit

Permalink
Fix NPE for finally blocks in RadonTransformerV2
Browse files Browse the repository at this point in the history
  • Loading branch information
Janmm14 authored and ItzSomebody committed Nov 24, 2022
1 parent b11f4b6 commit f10bf6c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ public boolean canCheckEquality(JavaValue first, JavaValue second, Context conte
&& ain.getPrevious() != null && ain.getPrevious() instanceof LabelNode) {
TryCatchBlockNode nullCatch = null;
for (TryCatchBlockNode tcbn : method.tryCatchBlocks) {
if (tcbn.type.equals("java/lang/NullPointerException")
if ("java/lang/NullPointerException".equals(tcbn.type)
&& tcbn.start == ain.getPrevious() && tcbn.end == ain.getNext().getNext()
&& tcbn.handler == ain.getNext().getNext().getNext().getNext()) {
nullCatch = tcbn;
Expand All @@ -390,7 +390,7 @@ public boolean canCheckEquality(JavaValue first, JavaValue second, Context conte
&& ain.getPrevious().getPrevious() != null && ain.getPrevious().getPrevious() instanceof LabelNode) {
TryCatchBlockNode nullCatch = null;
for (TryCatchBlockNode tcbn : method.tryCatchBlocks) {
if (tcbn.type.equals("java/lang/NullPointerException")
if ("java/lang/NullPointerException".equals(tcbn.type)
&& tcbn.start == ain.getPrevious().getPrevious() && tcbn.end == ain.getNext().getNext()
&& tcbn.handler == ain.getNext().getNext().getNext().getNext()) {
nullCatch = tcbn;
Expand Down

0 comments on commit f10bf6c

Please sign in to comment.