Skip to content

Commit

Permalink
Fix: Do not re-parent calls to interface super methods. (#150)
Browse files Browse the repository at this point in the history
The existing logic is wrong, and they will always be valid as-is because any superinterfaces will be merged onto the target class.
  • Loading branch information
LlamaLad7 authored Jul 1, 2024
1 parent d0a6ebd commit 2edfbc4
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,10 @@ private void processImaginarySuper(MethodNode method, FieldInsnNode fieldInsn) {
* @param methodRef Unbound reference to the method
*/
private void updateStaticBinding(MethodNode method, MemberRef methodRef) {
if (!methodRef.getOwner().equals(this.classNode.superName)) {
// Must be to an interface, no need to re-parent.
return;
}
this.updateBinding(method, methodRef, Traversal.SUPER);
}

Expand Down

0 comments on commit 2edfbc4

Please sign in to comment.