From 8bd5f748b468509b68040503ede0ed55bb34ba92 Mon Sep 17 00:00:00 2001 From: "lcartey@github.com" Date: Sun, 17 May 2020 22:36:50 +0100 Subject: [PATCH] Java: SpringController - handle non-string literal produces values. --- .../src/semmle/code/java/frameworks/spring/SpringController.qll | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/ql/src/semmle/code/java/frameworks/spring/SpringController.qll b/java/ql/src/semmle/code/java/frameworks/spring/SpringController.qll index 66cb689fbf4..e313aceec61 100644 --- a/java/ql/src/semmle/code/java/frameworks/spring/SpringController.qll +++ b/java/ql/src/semmle/code/java/frameworks/spring/SpringController.qll @@ -124,7 +124,7 @@ class SpringRequestMappingMethod extends SpringControllerMethod { /** Gets the "produces" @RequestMapping annotation value, if present. */ string getProduces() { - result = requestMappingAnnotation.getValue("produces").(StringLiteral).getValue() + result = requestMappingAnnotation.getValue("produces").(CompileTimeConstantExpr).getStringValue() } /** Holds if this is considered an @ResponseBody method. */