Skip to content

Commit 1815656

Browse files
committed
Use set literals for OGNL packages
1 parent 8d68200 commit 1815656

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

java/ql/src/semmle/code/java/security/OgnlInjection.qll

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,25 +53,18 @@ private class DefaultOgnlInjectionSink extends OgnlInjectionSink {
5353

5454
/** The class `org.apache.commons.ognl.Ognl` or `ognl.Ognl`. */
5555
private class TypeOgnl extends Class {
56-
TypeOgnl() {
57-
this.hasQualifiedName("org.apache.commons.ognl", "Ognl") or
58-
this.hasQualifiedName("ognl", "Ognl")
59-
}
56+
TypeOgnl() { this.hasQualifiedName(["org.apache.commons.ognl", "ognl"], "Ognl") }
6057
}
6158

6259
/** The interface `org.apache.commons.ognl.Node` or `ognl.Node`. */
6360
private class TypeNode extends Interface {
64-
TypeNode() {
65-
this.hasQualifiedName("org.apache.commons.ognl", "Node") or
66-
this.hasQualifiedName("ognl", "Node")
67-
}
61+
TypeNode() { this.hasQualifiedName(["org.apache.commons.ognl", "ognl"], "Node") }
6862
}
6963

7064
/** The interface `org.apache.commons.ognl.enhance.ExpressionAccessor` or `ognl.enhance.ExpressionAccessor`. */
7165
private class TypeExpressionAccessor extends Interface {
7266
TypeExpressionAccessor() {
73-
this.hasQualifiedName("org.apache.commons.ognl.enhance", "ExpressionAccessor") or
74-
this.hasQualifiedName("ognl.enhance", "ExpressionAccessor")
67+
this.hasQualifiedName(["org.apache.commons.ognl.enhance", "ognl.enhance"], "ExpressionAccessor")
7568
}
7669
}
7770

0 commit comments

Comments
 (0)