@@ -107,7 +107,7 @@ public Map<String, Object> hints() {
107
107
108
108
109
109
@ Test
110
- public void toMono () throws Exception {
110
+ public void toMono () {
111
111
BodyExtractor <Mono <String >, ReactiveHttpInputMessage > extractor = BodyExtractors .toMono (String .class );
112
112
113
113
DefaultDataBufferFactory factory = new DefaultDataBufferFactory ();
@@ -125,7 +125,7 @@ public void toMono() throws Exception {
125
125
}
126
126
127
127
@ Test
128
- public void toMonoParameterizedTypeReference () throws Exception {
128
+ public void toMonoParameterizedTypeReference () {
129
129
BodyExtractor <Mono <Map <String , String >>, ReactiveHttpInputMessage > extractor =
130
130
BodyExtractors .toMono (new ParameterizedTypeReference <Map <String , String >>() {});
131
131
@@ -147,7 +147,7 @@ public void toMonoParameterizedTypeReference() throws Exception {
147
147
}
148
148
149
149
@ Test
150
- public void toMonoWithHints () throws Exception {
150
+ public void toMonoWithHints () {
151
151
BodyExtractor <Mono <User >, ReactiveHttpInputMessage > extractor = BodyExtractors .toMono (User .class );
152
152
this .hints .put (JSON_VIEW_HINT , SafeToDeserialize .class );
153
153
@@ -172,7 +172,7 @@ public void toMonoWithHints() throws Exception {
172
172
}
173
173
174
174
@ Test // SPR-15758
175
- public void toMonoWithEmptyBodyAndNoContentType () throws Exception {
175
+ public void toMonoWithEmptyBodyAndNoContentType () {
176
176
BodyExtractor <Mono <Map <String , String >>, ReactiveHttpInputMessage > extractor =
177
177
BodyExtractors .toMono (new ParameterizedTypeReference <Map <String , String >>() {});
178
178
@@ -183,7 +183,7 @@ public void toMonoWithEmptyBodyAndNoContentType() throws Exception {
183
183
}
184
184
185
185
@ Test
186
- public void toFlux () throws Exception {
186
+ public void toFlux () {
187
187
BodyExtractor <Flux <String >, ReactiveHttpInputMessage > extractor = BodyExtractors .toFlux (String .class );
188
188
189
189
DefaultDataBufferFactory factory = new DefaultDataBufferFactory ();
@@ -201,7 +201,7 @@ public void toFlux() throws Exception {
201
201
}
202
202
203
203
@ Test
204
- public void toFluxWithHints () throws Exception {
204
+ public void toFluxWithHints () {
205
205
BodyExtractor <Flux <User >, ReactiveHttpInputMessage > extractor = BodyExtractors .toFlux (User .class );
206
206
this .hints .put (JSON_VIEW_HINT , SafeToDeserialize .class );
207
207
@@ -230,7 +230,7 @@ public void toFluxWithHints() throws Exception {
230
230
}
231
231
232
232
@ Test
233
- public void toFluxUnacceptable () throws Exception {
233
+ public void toFluxUnacceptable () {
234
234
BodyExtractor <Flux <String >, ReactiveHttpInputMessage > extractor = BodyExtractors .toFlux (String .class );
235
235
236
236
DefaultDataBufferFactory factory = new DefaultDataBufferFactory ();
@@ -266,9 +266,7 @@ public Map<String, Object> hints() {
266
266
}
267
267
268
268
@ Test
269
- public void toFormData () throws Exception {
270
- BodyExtractor <Mono <MultiValueMap <String , String >>, ServerHttpRequest > extractor = BodyExtractors .toFormData ();
271
-
269
+ public void toFormData () {
272
270
DefaultDataBufferFactory factory = new DefaultDataBufferFactory ();
273
271
String text = "name+1=value+1&name+2=value+2%2B1&name+2=value+2%2B2&name+3" ;
274
272
DefaultDataBuffer dataBuffer = factory .wrap (ByteBuffer .wrap (text .getBytes (StandardCharsets .UTF_8 )));
@@ -278,7 +276,7 @@ public void toFormData() throws Exception {
278
276
.contentType (MediaType .APPLICATION_FORM_URLENCODED )
279
277
.body (body );
280
278
281
- Mono <MultiValueMap <String , String >> result = extractor .extract (request , this .context );
279
+ Mono <MultiValueMap <String , String >> result = BodyExtractors . toFormData () .extract (request , this .context );
282
280
283
281
StepVerifier .create (result )
284
282
.consumeNextWith (form -> {
@@ -295,7 +293,7 @@ public void toFormData() throws Exception {
295
293
}
296
294
297
295
@ Test
298
- public void toParts () throws Exception {
296
+ public void toParts () {
299
297
BodyExtractor <Flux <Part >, ServerHttpRequest > extractor = BodyExtractors .toParts ();
300
298
301
299
String bodyContents = "-----------------------------9051914041544843365972754266\r \n " +
@@ -353,7 +351,7 @@ public void toParts() throws Exception {
353
351
}
354
352
355
353
@ Test
356
- public void toDataBuffers () throws Exception {
354
+ public void toDataBuffers () {
357
355
BodyExtractor <Flux <DataBuffer >, ReactiveHttpInputMessage > extractor = BodyExtractors .toDataBuffers ();
358
356
359
357
DefaultDataBufferFactory factory = new DefaultDataBufferFactory ();
0 commit comments