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