fix: reload request for correct class in method inline visitor (#999)
This commit is contained in:
@@ -586,7 +586,7 @@ public class ClassNode extends NotificationAttrNode implements ILoadable, ICodeN
|
||||
public void reloadAtCodegenStage() {
|
||||
ClassNode topCls = this.getTopParentClass();
|
||||
if (topCls.getLoadStage() == LoadStage.CODEGEN_STAGE) {
|
||||
throw new JadxRuntimeException("Class not yet loaded at codegen stage");
|
||||
throw new JadxRuntimeException("Class not yet loaded at codegen stage: " + topCls);
|
||||
}
|
||||
topCls.add(AFlag.RELOAD_AT_CODEGEN_STAGE);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public class InlineMethods extends AbstractVisitor {
|
||||
MethodInlineAttr mia = MarkMethodsForInline.process(callMth);
|
||||
if (mia == null) {
|
||||
// method not yet loaded => will retry at codegen stage
|
||||
mth.getParentClass().reloadAtCodegenStage();
|
||||
callMth.getParentClass().reloadAtCodegenStage();
|
||||
return;
|
||||
}
|
||||
if (mia.notNeeded()) {
|
||||
@@ -65,7 +65,7 @@ public class InlineMethods extends AbstractVisitor {
|
||||
}
|
||||
inlineMethod(mth, callMth, mia, block, insn);
|
||||
} catch (Exception e) {
|
||||
throw new JadxRuntimeException("Failed to process method for inline", e);
|
||||
throw new JadxRuntimeException("Failed to process method for inline: " + callMthInfo, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user