Skip to content

Commit b9bc1f9

Browse files
committed
Update style of inline expectation comments
1 parent 0987425 commit b9bc1f9

File tree

7 files changed

+701
-701
lines changed

7 files changed

+701
-701
lines changed

java/ql/test/library-tests/frameworks/JaxWs/JakartaRs1.java

Lines changed: 66 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -25,75 +25,75 @@
2525
import jakarta.ws.rs.ext.MessageBodyReader;
2626

2727
@Path("")
28-
public class JakartaRs1 { // $RootResourceClass
29-
public JakartaRs1() { // $InjectableConstructor
28+
public class JakartaRs1 { // $ RootResourceClass
29+
public JakartaRs1() { // $ InjectableConstructor
3030
}
3131

3232
@GET
33-
int Get() { // $ResourceMethod $ResourceMethodOnResourceClass
34-
return 0; // $XssSink
33+
int Get() { // $ ResourceMethod ResourceMethodOnResourceClass
34+
return 0; // $ XssSink
3535
}
3636

3737
@POST
38-
void Post() { // $ResourceMethod $ResourceMethodOnResourceClass
38+
void Post() { // $ ResourceMethod ResourceMethodOnResourceClass
3939
}
4040

41-
@Produces("text/plain") // $ProducesAnnotation=text/plain
41+
@Produces("text/plain") // $ ProducesAnnotation=text/plain
4242
@DELETE
43-
double Delete() { // $ResourceMethod=text/plain $ResourceMethodOnResourceClass
44-
return 0.0; // $XssSink
43+
double Delete() { // $ ResourceMethod=text/plain ResourceMethodOnResourceClass
44+
return 0.0; // $ XssSink
4545
}
4646

47-
@Produces(MediaType.TEXT_HTML) // $ProducesAnnotation=text/html
47+
@Produces(MediaType.TEXT_HTML) // $ ProducesAnnotation=text/html
4848
@PUT
49-
void Put() { // $ResourceMethod=text/html $ResourceMethodOnResourceClass
49+
void Put() { // $ ResourceMethod=text/html ResourceMethodOnResourceClass
5050
}
5151

5252
@OPTIONS
53-
void Options() { // $ResourceMethod $ResourceMethodOnResourceClass
53+
void Options() { // $ ResourceMethod ResourceMethodOnResourceClass
5454
}
5555

5656
@HEAD
57-
void Head() { // $ResourceMethod $ResourceMethodOnResourceClass
57+
void Head() { // $ ResourceMethod ResourceMethodOnResourceClass
5858
}
5959

6060
@Path("")
61-
NonRootResourceClassJakarta subResourceLocator() { // $SubResourceLocator
61+
NonRootResourceClassJakarta subResourceLocator() { // $ SubResourceLocator
6262
return null;
6363
}
6464

65-
public class NonRootResourceClassJakarta { // $NonRootResourceClass
65+
public class NonRootResourceClassJakarta { // $ NonRootResourceClass
6666
@GET
67-
int Get() { // $ResourceMethod $ResourceMethodOnResourceClass
68-
return 0; // $XssSink
67+
int Get() { // $ ResourceMethod ResourceMethodOnResourceClass
68+
return 0; // $ XssSink
6969
}
7070

71-
@Produces("text/html") // $ProducesAnnotation=text/html
71+
@Produces("text/html") // $ ProducesAnnotation=text/html
7272
@POST
73-
boolean Post() { // $ResourceMethod=text/html $ResourceMethodOnResourceClass
73+
boolean Post() { // $ ResourceMethod=text/html ResourceMethodOnResourceClass
7474
return false;
7575
}
7676

77-
@Produces(MediaType.TEXT_PLAIN) // $ProducesAnnotation=text/plain
77+
@Produces(MediaType.TEXT_PLAIN) // $ ProducesAnnotation=text/plain
7878
@DELETE
79-
double Delete() { // $ResourceMethod=text/plain $ResourceMethodOnResourceClass
80-
return 0.0; // $XssSink
79+
double Delete() { // $ ResourceMethod=text/plain ResourceMethodOnResourceClass
80+
return 0.0; // $ XssSink
8181
}
8282

8383
@Path("")
84-
AnotherNonRootResourceClassJakarta subResourceLocator1() { // $SubResourceLocator
84+
AnotherNonRootResourceClassJakarta subResourceLocator1() { // $ SubResourceLocator
8585
return null;
8686
}
8787

8888
@GET
8989
@Path("")
90-
NotAResourceClass1Jakarta NotASubResourceLocator1() { // $ResourceMethod $ResourceMethodOnResourceClass
91-
return null; // $XssSink
90+
NotAResourceClass1Jakarta NotASubResourceLocator1() { // $ ResourceMethod ResourceMethodOnResourceClass
91+
return null; // $ XssSink
9292
}
9393

9494
@GET
95-
NotAResourceClass2Jakarta NotASubResourceLocator2() { // $ResourceMethod $ResourceMethodOnResourceClass
96-
return null; // $XssSink
95+
NotAResourceClass2Jakarta NotASubResourceLocator2() { // $ ResourceMethod ResourceMethodOnResourceClass
96+
return null; // $ XssSink
9797
}
9898

9999
NotAResourceClass2Jakarta NotASubResourceLocator3() {
@@ -102,50 +102,50 @@ NotAResourceClass2Jakarta NotASubResourceLocator3() {
102102
}
103103
}
104104

105-
class AnotherNonRootResourceClassJakarta { // $NonRootResourceClass
105+
class AnotherNonRootResourceClassJakarta { // $ NonRootResourceClass
106106
public AnotherNonRootResourceClassJakarta() {
107107
}
108108

109109
public AnotherNonRootResourceClassJakarta(
110-
@BeanParam int beanParam, // $InjectionAnnotation
111-
@CookieParam("") int cookieParam, // $InjectionAnnotation
112-
@FormParam("") int formParam, // $InjectionAnnotation
113-
@HeaderParam("") int headerParam, // $InjectionAnnotation
114-
@MatrixParam("") int matrixParam, // $InjectionAnnotation
115-
@PathParam("") int pathParam, // $InjectionAnnotation
116-
@QueryParam("") int queryParam, // $InjectionAnnotation
117-
@Context int context) { // $InjectionAnnotation
110+
@BeanParam int beanParam, // $ InjectionAnnotation
111+
@CookieParam("") int cookieParam, // $ InjectionAnnotation
112+
@FormParam("") int formParam, // $ InjectionAnnotation
113+
@HeaderParam("") int headerParam, // $ InjectionAnnotation
114+
@MatrixParam("") int matrixParam, // $ InjectionAnnotation
115+
@PathParam("") int pathParam, // $ InjectionAnnotation
116+
@QueryParam("") int queryParam, // $ InjectionAnnotation
117+
@Context int context) { // $ InjectionAnnotation
118118
}
119119

120120
@Path("")
121-
public void resourceMethodWithBeanParamParameter(@BeanParam FooJakarta FooJakarta) { // $SubResourceLocator $InjectionAnnotation
121+
public void resourceMethodWithBeanParamParameter(@BeanParam FooJakarta FooJakarta) { // $ SubResourceLocator InjectionAnnotation
122122
}
123123
}
124124

125125
class FooJakarta {
126-
FooJakarta() { // $BeanParamConstructor
126+
FooJakarta() { // $ BeanParamConstructor
127127
}
128128

129-
public FooJakarta( // $BeanParamConstructor
130-
@BeanParam int beanParam, // $InjectionAnnotation
131-
@CookieParam("") int cookieParam, // $InjectionAnnotation
132-
@FormParam("") int formParam, // $InjectionAnnotation
133-
@HeaderParam("") int headerParam, // $InjectionAnnotation
134-
@MatrixParam("") int matrixParam, // $InjectionAnnotation
135-
@PathParam("") int pathParam, // $InjectionAnnotation
136-
@QueryParam("") int queryParam, // $InjectionAnnotation
137-
@Context int context) { // $InjectionAnnotation
129+
public FooJakarta( // $ BeanParamConstructor
130+
@BeanParam int beanParam, // $ InjectionAnnotation
131+
@CookieParam("") int cookieParam, // $ InjectionAnnotation
132+
@FormParam("") int formParam, // $ InjectionAnnotation
133+
@HeaderParam("") int headerParam, // $ InjectionAnnotation
134+
@MatrixParam("") int matrixParam, // $ InjectionAnnotation
135+
@PathParam("") int pathParam, // $ InjectionAnnotation
136+
@QueryParam("") int queryParam, // $ InjectionAnnotation
137+
@Context int context) { // $ InjectionAnnotation
138138
}
139139

140140
public FooJakarta(
141-
@BeanParam int beanParam, // $InjectionAnnotation
142-
@CookieParam("") int cookieParam, // $InjectionAnnotation
143-
@FormParam("") int formParam, // $InjectionAnnotation
144-
@HeaderParam("") int headerParam, // $InjectionAnnotation
145-
@MatrixParam("") int matrixParam, // $InjectionAnnotation
146-
@PathParam("") int pathParam, // $InjectionAnnotation
147-
@QueryParam("") int queryParam, // $InjectionAnnotation
148-
@Context int context, // $InjectionAnnotation
141+
@BeanParam int beanParam, // $ InjectionAnnotation
142+
@CookieParam("") int cookieParam, // $ InjectionAnnotation
143+
@FormParam("") int formParam, // $ InjectionAnnotation
144+
@HeaderParam("") int headerParam, // $ InjectionAnnotation
145+
@MatrixParam("") int matrixParam, // $ InjectionAnnotation
146+
@PathParam("") int pathParam, // $ InjectionAnnotation
147+
@QueryParam("") int queryParam, // $ InjectionAnnotation
148+
@Context int context, // $ InjectionAnnotation
149149
int paramWithoutAnnotation) {
150150
}
151151
}
@@ -158,58 +158,58 @@ class NotAResourceClass2Jakarta {
158158

159159
class ExtendsJakartaRs1 extends JakartaRs1 {
160160
@Override
161-
int Get() { // $ResourceMethod
161+
int Get() { // $ ResourceMethod
162162
return 1;
163163
}
164164

165165
@Override
166-
@QueryParam("") // $InjectionAnnotation
166+
@QueryParam("") // $ InjectionAnnotation
167167
void Post() {
168168
}
169169

170170
@Override
171-
double Delete() { // $ResourceMethod=text/plain
171+
double Delete() { // $ ResourceMethod=text/plain
172172
return 1.0;
173173
}
174174

175175
@Override
176-
void Put() { // $ResourceMethod=text/html
176+
void Put() { // $ ResourceMethod=text/html
177177
}
178178

179-
@Produces("application/json") // $ProducesAnnotation=application/json
179+
@Produces("application/json") // $ ProducesAnnotation=application/json
180180
@Override
181181
void Options() {
182182
}
183183

184-
@Produces(MediaType.TEXT_XML) // $ProducesAnnotation=text/xml
184+
@Produces(MediaType.TEXT_XML) // $ ProducesAnnotation=text/xml
185185
@Override
186186
void Head() {
187187
}
188188

189189
}
190190

191-
@Produces(MediaType.TEXT_XML) // $ProducesAnnotation=text/xml
191+
@Produces(MediaType.TEXT_XML) // $ ProducesAnnotation=text/xml
192192
class ExtendsJakartaRs1WithProducesAnnotation extends JakartaRs1 {
193193
@Override
194-
int Get() { // $ResourceMethod=text/xml
194+
int Get() { // $ ResourceMethod=text/xml
195195
return 2;
196196
}
197197

198198
@Override
199-
@QueryParam("") // $InjectionAnnotation
199+
@QueryParam("") // $ InjectionAnnotation
200200
void Post() {
201201
}
202202

203203
@Override
204-
double Delete() { // $ResourceMethod=text/plain
204+
double Delete() { // $ ResourceMethod=text/plain
205205
return 2.0;
206206
}
207207

208208
@Override
209-
void Put() { // $ResourceMethod=text/html
209+
void Put() { // $ ResourceMethod=text/html
210210
}
211211

212212
@Override
213-
void Options() { // $ResourceMethod=text/xml
213+
void Options() { // $ ResourceMethod=text/xml
214214
}
215215
}

java/ql/test/library-tests/frameworks/JaxWs/JakartaRs2.java

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -25,48 +25,48 @@
2525
import jakarta.ws.rs.ext.MessageBodyReader;
2626

2727
@Path("")
28-
class JakartaRs2 { // $RootResourceClass
28+
class JakartaRs2 { // $ RootResourceClass
2929
JakartaRs2() {
3030
}
3131

32-
public JakartaRs2(// $InjectableConstructor
33-
@BeanParam int beanParam, // $InjectionAnnotation
34-
@CookieParam("") int cookieParam, // $InjectionAnnotation
35-
@FormParam("") int formParam, // $InjectionAnnotation
36-
@HeaderParam("") int headerParam, // $InjectionAnnotation
37-
@MatrixParam("") int matrixParam, // $InjectionAnnotation
38-
@PathParam("") int pathParam, // $InjectionAnnotation
39-
@QueryParam("") int queryParam, // $InjectionAnnotation
40-
@Context int context) { // $InjectionAnnotation
32+
public JakartaRs2(// $ InjectableConstructor
33+
@BeanParam int beanParam, // $ InjectionAnnotation
34+
@CookieParam("") int cookieParam, // $ InjectionAnnotation
35+
@FormParam("") int formParam, // $ InjectionAnnotation
36+
@HeaderParam("") int headerParam, // $ InjectionAnnotation
37+
@MatrixParam("") int matrixParam, // $ InjectionAnnotation
38+
@PathParam("") int pathParam, // $ InjectionAnnotation
39+
@QueryParam("") int queryParam, // $ InjectionAnnotation
40+
@Context int context) { // $ InjectionAnnotation
4141
}
4242

43-
public JakartaRs2(@BeanParam int beanParam, // $InjectionAnnotation
44-
@CookieParam("") int cookieParam, // $InjectionAnnotation
45-
@FormParam("") int formParam, // $InjectionAnnotation
46-
@HeaderParam("") int headerParam, // $InjectionAnnotation
47-
@MatrixParam("") int matrixParam, // $InjectionAnnotation
48-
@PathParam("") int pathParam, // $InjectionAnnotation
49-
@QueryParam("") int queryParam, // $InjectionAnnotation
50-
@Context int context, // $InjectionAnnotation
43+
public JakartaRs2(@BeanParam int beanParam, // $ InjectionAnnotation
44+
@CookieParam("") int cookieParam, // $ InjectionAnnotation
45+
@FormParam("") int formParam, // $ InjectionAnnotation
46+
@HeaderParam("") int headerParam, // $ InjectionAnnotation
47+
@MatrixParam("") int matrixParam, // $ InjectionAnnotation
48+
@PathParam("") int pathParam, // $ InjectionAnnotation
49+
@QueryParam("") int queryParam, // $ InjectionAnnotation
50+
@Context int context, // $ InjectionAnnotation
5151
int paramWithoutAnnotation) {
5252
}
5353

54-
@BeanParam // $InjectionAnnotation
55-
int beanField; // $InjectableField
56-
@CookieParam("") // $InjectionAnnotation
57-
int cookieField; // $InjectableField
58-
@FormParam("") // $InjectionAnnotation
59-
int formField; // $InjectableField
60-
@HeaderParam("") // $InjectionAnnotation
61-
int headerField; // $InjectableField
62-
@MatrixParam("") // $InjectionAnnotation
63-
int matrixField; // $InjectableField
64-
@PathParam("") // $InjectionAnnotation
65-
int pathField; // $InjectableField
66-
@QueryParam("") // $InjectionAnnotation
67-
int queryField; // $InjectableField
68-
@Context // $InjectionAnnotation
69-
int context; // $InjectableField
54+
@BeanParam // $ InjectionAnnotation
55+
int beanField; // $ InjectableField
56+
@CookieParam("") // $ InjectionAnnotation
57+
int cookieField; // $ InjectableField
58+
@FormParam("") // $ InjectionAnnotation
59+
int formField; // $ InjectableField
60+
@HeaderParam("") // $ InjectionAnnotation
61+
int headerField; // $ InjectableField
62+
@MatrixParam("") // $ InjectionAnnotation
63+
int matrixField; // $ InjectableField
64+
@PathParam("") // $ InjectionAnnotation
65+
int pathField; // $ InjectableField
66+
@QueryParam("") // $ InjectionAnnotation
67+
int queryField; // $ InjectableField
68+
@Context // $ InjectionAnnotation
69+
int context; // $ InjectableField
7070
int fieldWithoutAnnotation;
7171
}
7272

@@ -85,14 +85,14 @@ public Object readFrom(Class aClass, Type type, Annotation[] annotations, MediaT
8585
}
8686

8787
class MiscellaneousJakarta {
88-
@Consumes("") // $ConsumesAnnotation
88+
@Consumes("") // $ ConsumesAnnotation
8989
public static void miscellaneousJakarta() throws IOException {
90-
Response.ResponseBuilder responseBuilder = Response.accepted(); // $ResponseBuilderDeclaration
91-
Response response = responseBuilder.build(); // $ResponseDeclaration
92-
Client client; // $ClientDeclaration
93-
MessageBodyReader<String> messageBodyReader = null; // $MessageBodyReaderDeclaration
94-
messageBodyReader.readFrom(null, null, null, null, null, null); // $MessageBodyReaderReadFromCall $MessageBodyReaderReadCall
90+
Response.ResponseBuilder responseBuilder = Response.accepted(); // $ ResponseBuilderDeclaration
91+
Response response = responseBuilder.build(); // $ ResponseDeclaration
92+
Client client; // $ ClientDeclaration
93+
MessageBodyReader<String> messageBodyReader = null; // $ MessageBodyReaderDeclaration
94+
messageBodyReader.readFrom(null, null, null, null, null, null); // $ MessageBodyReaderReadFromCall MessageBodyReaderReadCall
9595
CustomUnmarshallerJakarta CustomUnmarshallerJakarta = null;
96-
CustomUnmarshallerJakarta.readFrom(null, null, null, null, null, null); // $MessageBodyReaderReadCall
96+
CustomUnmarshallerJakarta.readFrom(null, null, null, null, null, null); // $ MessageBodyReaderReadCall
9797
}
9898
}

0 commit comments

Comments
 (0)