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:
Napalys Klicius
2025-08-22 08:43:20 +02:00
parent 0b172080aa
commit 66f2911497

View File

@@ -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*()
}
/**