Skip to content

Commit d547320

Browse files
committed
Java: Allow methods with empty bodies for overlay
1 parent 0993d36 commit d547320

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

java/ql/lib/semmle/code/java/Member.qll

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,13 @@ class SrcMethod extends Method {
624624
then implementsInterfaceMethod(result, this)
625625
else result.getASourceOverriddenMethod*() = this
626626
) and
627-
(exists(result.getBody()) or result.hasModifier("native"))
627+
(
628+
// We allow empty method bodies for the local overlay variant to allow
629+
// calls to methods only fully extracted in base.
630+
isOverlay() or
631+
exists(result.getBody()) or
632+
result.hasModifier("native")
633+
)
628634
}
629635
}
630636

0 commit comments

Comments
 (0)