Skip to content

Commit 406466d

Browse files
committed
Simplify specifiesContentType predicate
1 parent e92b9cb commit 406466d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

java/ql/lib/semmle/code/java/frameworks/spring/SpringHttp.qll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ private class SpringHttpFlowStep extends SummaryModelCsv {
145145
}
146146

147147
private predicate specifiesContentType(SpringRequestMappingMethod method) {
148-
method.getProducesExpr().(ArrayInit).getSize() != 0 or
149-
not method.getProducesExpr() instanceof ArrayInit
148+
exists(method.getAProducesExpr())
150149
}
151150

152151
private class SpringXssSink extends XSS::XssSink {

0 commit comments

Comments
 (0)