mirror of
https://github.com/github/codeql.git
synced 2026-04-25 08:45:14 +02:00
Update java/ql/src/Violations of Best Practice/Implementation Hiding/VisibleForTestingAbuse.ql
Co-authored-by: Michael Nebel <michaelnebel@github.com>
This commit is contained in:
@@ -20,10 +20,7 @@ import java
|
||||
*/
|
||||
predicate isWithinType(Callable c, RefType t) {
|
||||
// Either the callable is in the target type, or they share a common enclosing type
|
||||
exists(RefType commonType |
|
||||
(c.getDeclaringType() = commonType or c.getDeclaringType().getEnclosingType*() = commonType) and
|
||||
(t = commonType or t.getEnclosingType*() = commonType)
|
||||
)
|
||||
c.getDeclaringType().getEnclosingType*() = t.getEnclosingType*()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user