Skip to content

Commit 3bf4149

Browse files
authored
Apply suggestions from code review
1 parent 7f556de commit 3bf4149

File tree

1 file changed

+5
-7
lines changed
  • java/ql/src/semmle/code/java/frameworks

1 file changed

+5
-7
lines changed

java/ql/src/semmle/code/java/frameworks/JaxWS.qll

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -308,11 +308,9 @@ class JaxRSProducesAnnotation extends JaxRSAnnotation {
308308
* Gets a declared content type that can be produced by this resource.
309309
*/
310310
Expr getADeclaredContentTypeExpr() {
311-
(
312-
result = this.getAValue() and not result instanceof ArrayInit
313-
or
314-
result = this.getAValue().(ArrayInit).getAnInit()
315-
)
311+
result = this.getAValue() and not result instanceof ArrayInit
312+
or
313+
result = this.getAValue().(ArrayInit).getAnInit()
316314
}
317315
}
318316

@@ -823,7 +821,7 @@ private predicate isXssSafeContentTypeExpr(Expr e) { isXssSafeContentType(getCon
823821
* This could be an instance of `Response.ResponseBuilder`, `Variant`, `Variant.VariantListBuilder` or
824822
* a `List<Variant>`.
825823
*
826-
* This routine is used to search forwards for response entities set after the content-type is configured.
824+
* This predicate is used to search forwards for response entities set after the content-type is configured.
827825
* It does not need to consider cases where the entity is set in the same call, or the entity has already
828826
* been set: these are handled by simple sanitization below.
829827
*/
@@ -882,7 +880,7 @@ private DataFlow::Node getABuilderWithExplicitContentType(Expr contentType) {
882880
)
883881
or
884882
// Recursive case: ordinary local dataflow
885-
DataFlow::localFlow(getABuilderWithExplicitContentType(contentType), result)
883+
DataFlow::localFlowStep(getABuilderWithExplicitContentType(contentType), result)
886884
}
887885

888886
private DataFlow::Node getASanitizedBuilder() {

0 commit comments

Comments
 (0)