Skip to content

Commit ae21de9

Browse files
committed
Java: Misc grammar and formatting.
1 parent b06d1c7 commit ae21de9

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

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

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SpringControllerAnnotation extends AnnotationType {
1919
/**
2020
* An annotation type that identifies Spring rest controllers.
2121
*
22-
* Rest controllers are the same as controllers, but imply the @ResponseBody annotation.
22+
* Rest controllers are the same as controllers, but imply the `@ResponseBody` annotation.
2323
*/
2424
class SpringRestControllerAnnotation extends SpringControllerAnnotation {
2525
SpringRestControllerAnnotation() { hasName("RestController") }
@@ -78,7 +78,7 @@ class SpringInitBinderMethod extends SpringControllerMethod {
7878
}
7979

8080
/**
81-
* An `AnnotationType` which is used to indicate a `RequestMapping`.
81+
* An `AnnotationType` that is used to indicate a `RequestMapping`.
8282
*/
8383
class SpringRequestMappingAnnotationType extends AnnotationType {
8484
SpringRequestMappingAnnotationType() {
@@ -91,7 +91,7 @@ class SpringRequestMappingAnnotationType extends AnnotationType {
9191
}
9292

9393
/**
94-
* An `AnnotationType` which is used to indicate a `ResponseBody`.
94+
* An `AnnotationType` that is used to indicate a `ResponseBody`.
9595
*/
9696
class SpringResponseBodyAnnotationType extends AnnotationType {
9797
SpringResponseBodyAnnotationType() {
@@ -126,12 +126,10 @@ class SpringRequestMappingMethod extends SpringControllerMethod {
126126
requestMappingAnnotation.getValue("produces").(CompileTimeConstantExpr).getStringValue()
127127
}
128128

129-
/** Holds if this is considered an @ResponseBody method. */
129+
/** Holds if this is considered an `@ResponseBody` method. */
130130
predicate isResponseBody() {
131-
getAnAnnotation().getType() instanceof SpringResponseBodyAnnotationType
132-
or
133-
getDeclaringType().getAnAnnotation().getType() instanceof SpringResponseBodyAnnotationType
134-
or
131+
getAnAnnotation().getType() instanceof SpringResponseBodyAnnotationType or
132+
getDeclaringType().getAnAnnotation().getType() instanceof SpringResponseBodyAnnotationType or
135133
getDeclaringType() instanceof SpringRestController
136134
}
137135
}
@@ -242,13 +240,13 @@ class SpringRequestMappingParameter extends Parameter {
242240
not isImplicitRequestParam()
243241
}
244242

245-
/** Holds if this is an explicit or implicit @ModelAttribute parameter */
243+
/** Holds if this is an explicit or implicit `@ModelAttribute` parameter. */
246244
predicate isModelAttribute() {
247245
isImplicitModelAttribute() or
248246
getAnAnnotation() instanceof SpringModelAttributeAnnotation
249247
}
250248

251-
/** Holds if the input is tainted */
249+
/** Holds if the input is tainted. */
252250
predicate isTaintedInput() {
253251
isExplicitlyTaintedInput()
254252
or
@@ -329,7 +327,7 @@ private RefType stripType(Type t) {
329327
/**
330328
* A user data type that may be populated from an HTTP request.
331329
*
332-
* This includes types directly referred to as either @ModelAttribute or @RequestBody parameters,
330+
* This includes types directly referred to as either `@ModelAttribute` or `@RequestBody` parameters,
333331
* or types that are referred to by those types.
334332
*/
335333
class SpringUntrustedDataType extends RefType {

0 commit comments

Comments
 (0)