Skip to content

Commit 70e1724

Browse files
author
Benjamin Muskalla
committed
Exclude methods with non-public parameter types
1 parent cb0a567 commit 70e1724

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

java/ql/src/utils/Stubs.qll

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,12 @@ private predicate excludedMember(Member m) {
361361
m.(Method).getDeclaringType() instanceof EnumType and
362362
m.hasName(["values", "valueOf"]) and
363363
m.isStatic()
364+
or
365+
exists(Parameter p |
366+
p = m.(Method).getAParameter() and
367+
p.getType().fromSource() and
368+
not p.getType().(RefType).isPublic()
369+
)
364370
}
365371

366372
private string stubMember(Member m) {

0 commit comments

Comments
 (0)