Skip to content

Commit 66f2911

Browse files
Napalysmichaelnebel
andcommitted
Update java/ql/src/Violations of Best Practice/Implementation Hiding/VisibleForTestingAbuse.ql
Co-authored-by: Michael Nebel <[email protected]>
1 parent 0b17208 commit 66f2911

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

java/ql/src/Violations of Best Practice/Implementation Hiding/VisibleForTestingAbuse.ql

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ import java
2020
*/
2121
predicate isWithinType(Callable c, RefType t) {
2222
// Either the callable is in the target type, or they share a common enclosing type
23-
exists(RefType commonType |
24-
(c.getDeclaringType() = commonType or c.getDeclaringType().getEnclosingType*() = commonType) and
25-
(t = commonType or t.getEnclosingType*() = commonType)
26-
)
23+
c.getDeclaringType().getEnclosingType*() = t.getEnclosingType*()
2724
}
2825

2926
/**

0 commit comments

Comments
 (0)