Skip to content

Commit

Permalink
Fix inheritance issue in ClassCastException causing InvokePolymorphic…
Browse files Browse the repository at this point in the history
…Expr

NewTransformer#findInvokeExpr attempts to cast InvokePolymorphicExpr to InvokeExpr under certain inputs, which causes a ClassCastException. It appears that InvokePolymorphicExpr was meant to extend InvokeExpr for this reason.
  • Loading branch information
nick-botticelli committed Sep 5, 2021
1 parent f1da047 commit 9c6cde4
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
import com.googlecode.dex2jar.ir.LabelAndLocalMapper;
import com.googlecode.dex2jar.ir.Util;

public class InvokePolymorphicExpr extends AbstractInvokeExpr {
public class InvokePolymorphicExpr extends InvokeExpr {

public Proto proto;

public Method method;

@Override
protected void releaseMemory() {
method = null;
Expand All @@ -24,9 +22,8 @@ public Proto getProto() {
}

public InvokePolymorphicExpr(VT type, Value[] args, Proto proto, Method method) {
super(type, args);
super(type, args, method);
this.proto = proto;
this.method = method;
}

@Override
Expand Down

0 comments on commit 9c6cde4

Please sign in to comment.