diff --git a/java/ql/lib/semmle/code/java/NumberFormatException.qll b/java/ql/lib/semmle/code/java/NumberFormatException.qll index 83f66d1a709..96174cd1ddc 100644 --- a/java/ql/lib/semmle/code/java/NumberFormatException.qll +++ b/java/ql/lib/semmle/code/java/NumberFormatException.qll @@ -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"]) } } diff --git a/java/ql/lib/semmle/code/java/frameworks/JAXB.qll b/java/ql/lib/semmle/code/java/frameworks/JAXB.qll index 96075bbccf3..1283aa3d21e 100644 --- a/java/ql/lib/semmle/code/java/frameworks/JAXB.qll +++ b/java/ql/lib/semmle/code/java/frameworks/JAXB.qll @@ -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"]) } } diff --git a/java/ql/lib/semmle/code/java/frameworks/spring/SpringController.qll b/java/ql/lib/semmle/code/java/frameworks/spring/SpringController.qll index ee00433da12..a444dc96d5a 100644 --- a/java/ql/lib/semmle/code/java/frameworks/spring/SpringController.qll +++ b/java/ql/lib/semmle/code/java/frameworks/spring/SpringController.qll @@ -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" + ]) ) } }