Skip to content

Commit 8bd5f74

Browse files
committed
Java: SpringController - handle non-string literal produces values.
1 parent 0db7cea commit 8bd5f74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/ql/src/semmle/code/java/frameworks/spring/SpringController.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class SpringRequestMappingMethod extends SpringControllerMethod {
124124

125125
/** Gets the "produces" @RequestMapping annotation value, if present. */
126126
string getProduces() {
127-
result = requestMappingAnnotation.getValue("produces").(StringLiteral).getValue()
127+
result = requestMappingAnnotation.getValue("produces").(CompileTimeConstantExpr).getStringValue()
128128
}
129129

130130
/** Holds if this is considered an @ResponseBody method. */

0 commit comments

Comments
 (0)