Skip to content

Commit bea0ce9

Browse files
committed
Fix review findings
1 parent e66d2dd commit bea0ce9

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,7 @@ abstract class Modifiable extends Element {
3131
* abstract, so `isAbstract()` will hold for them even if `hasModifier("abstract")`
3232
* does not.
3333
*/
34-
predicate hasModifier(string m) {
35-
exists(Modifier mod | mod = this.getAModifier() |
36-
modifiers(mod, m) and
37-
// Kotlin "internal" elements may also get "public" modifiers, so we want to filter those out
38-
not exists(Modifier mod2 |
39-
hasModifier(this, mod2) and modifiers(mod, "public") and modifiers(mod2, "internal")
40-
)
41-
)
42-
}
34+
predicate hasModifier(string m) { modifiers(this.getAModifier(), m) }
4335

4436
/** Holds if this element has no modifier. */
4537
predicate hasNoModifier() { not hasModifier(this, _) }

0 commit comments

Comments
 (0)