mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Use set literals #2
This commit is contained in:
@@ -46,12 +46,7 @@ private class SpecialClassInstanceExpr extends ClassInstanceExpr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
predicate throwsNfe() {
|
predicate throwsNfe() {
|
||||||
this.isStringConstructor("Byte") or
|
this.isStringConstructor(["Byte", "Short", "Integer", "Long", "Float", "Double"])
|
||||||
this.isStringConstructor("Short") or
|
|
||||||
this.isStringConstructor("Integer") or
|
|
||||||
this.isStringConstructor("Long") or
|
|
||||||
this.isStringConstructor("Float") or
|
|
||||||
this.isStringConstructor("Double")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -107,10 +107,7 @@ class XmlAccessType extends EnumConstant {
|
|||||||
*/
|
*/
|
||||||
class JaxbMemberAnnotation extends JaxbAnnotationType {
|
class JaxbMemberAnnotation extends JaxbAnnotationType {
|
||||||
JaxbMemberAnnotation() {
|
JaxbMemberAnnotation() {
|
||||||
this.hasName("XmlElement") or
|
this.hasName(["XmlElement", "XmlAttribute", "XmlElementRefs", "XmlElements"])
|
||||||
this.hasName("XmlAttribute") or
|
|
||||||
this.hasName("XmlElementRefs") or
|
|
||||||
this.hasName("XmlElements")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -187,13 +187,10 @@ class SpringServletInputAnnotation extends Annotation {
|
|||||||
a = this.getType() and
|
a = this.getType() and
|
||||||
a.getPackage().getName() = "org.springframework.web.bind.annotation"
|
a.getPackage().getName() = "org.springframework.web.bind.annotation"
|
||||||
|
|
|
|
||||||
a.hasName("MatrixVariable") or
|
a.hasName([
|
||||||
a.hasName("RequestParam") or
|
"MatrixVariable", "RequestParam", "RequestHeader", "CookieValue", "RequestPart",
|
||||||
a.hasName("RequestHeader") or
|
"PathVariable", "RequestBody"
|
||||||
a.hasName("CookieValue") or
|
])
|
||||||
a.hasName("RequestPart") or
|
|
||||||
a.hasName("PathVariable") or
|
|
||||||
a.hasName("RequestBody")
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user