Skip to content

Commit

Permalink
Don't get polymorphic references for constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
Earthcomputer committed Nov 29, 2024
1 parent b751737 commit 9030ddf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public ReferencesSet findMethodReferences(String owner, String name, String desc
// we don't know whether the method is virtual or not yet, so find the non-virtual method first and then check
// if it's non-virtual
ReferencesSet nonVirtualReferences = resolveNonVirtualMethod(classInfo, new NameAndDesc(name, desc), index::get);
if (nonVirtualReferences != null && (nonVirtualReferences.access & (Opcodes.ACC_PRIVATE | Opcodes.ACC_STATIC)) != 0) {
if (nonVirtualReferences != null && ((nonVirtualReferences.access & (Opcodes.ACC_PRIVATE | Opcodes.ACC_STATIC)) != 0 || "<init>".equals(name))) {
return nonVirtualReferences;
}

Expand Down

0 comments on commit 9030ddf

Please sign in to comment.