Skip to content

Commit 979118c

Browse files
committed
Polishing
1 parent f87a87e commit 979118c

File tree

3 files changed

+16
-19
lines changed

3 files changed

+16
-19
lines changed

spring-core/src/main/java/org/springframework/core/io/buffer/DataBuffer.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -421,11 +421,9 @@ default void toByteBuffer(ByteBuffer dest) {
421421
* Copies the given length from this data buffer into the given destination
422422
* {@code ByteBuffer}, beginning at the given source position, and the
423423
* given destination position in the destination byte buffer.
424-
* @param srcPos the position of this data buffer from where copying should
425-
* start
424+
* @param srcPos the position of this data buffer from where copying should start
426425
* @param dest the destination byte buffer
427-
* @param destPos the position in {@code dest} to where copying should
428-
* start
426+
* @param destPos the position in {@code dest} to where copying should start
429427
* @param length the amount of data to copy
430428
* @since 6.0.5
431429
*/
@@ -436,7 +434,6 @@ default void toByteBuffer(ByteBuffer dest) {
436434
* buffer that can be read. Calling this method is more efficient than
437435
* {@link #toByteBuffer()}, as no data is copied. However, the byte buffers
438436
* provided can only be used during the iteration.
439-
*
440437
* <p><b>Note</b> that the returned iterator must be used in a
441438
* try-with-resources clause or explicitly
442439
* {@linkplain ByteBufferIterator#close() closed}.
@@ -449,7 +446,6 @@ default void toByteBuffer(ByteBuffer dest) {
449446
* Returns a closeable iterator over each {@link ByteBuffer} in this data
450447
* buffer that can be written to. The byte buffers provided can only be used
451448
* during the iteration.
452-
*
453449
* <p><b>Note</b> that the returned iterator must be used in a
454450
* try-with-resources clause or explicitly
455451
* {@linkplain ByteBufferIterator#close() closed}.
@@ -519,6 +515,7 @@ default String toString(Charset charset) {
519515
* A dedicated iterator type that ensures the lifecycle of iterated
520516
* {@link ByteBuffer} elements. This iterator must be used in a
521517
* try-with-resources clause or explicitly {@linkplain #close() closed}.
518+
* @since 6.0.5
522519
* @see DataBuffer#readableByteBuffers()
523520
* @see DataBuffer#writableByteBuffers()
524521
*/

spring-test/src/test/java/org/springframework/test/web/client/match/MockRestRequestMatchersTests.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -203,20 +203,20 @@ void headerListContainsMismatch() {
203203

204204
assertThatExceptionOfType(AssertionError.class).isThrownBy(() -> MockRestRequestMatchers
205205
.header("foo", contains(containsString("ba"))).match(this.request))
206-
.withMessage("Request header values for [foo]\n"
207-
+ "Expected: iterable containing [a string containing \"ba\"]\n"
206+
.withMessage("Request header values for [foo]" + System.lineSeparator()
207+
+ "Expected: iterable containing [a string containing \"ba\"]" + System.lineSeparator()
208208
+ " but: not matched: \"baz\"");
209209

210210
assertThatExceptionOfType(AssertionError.class).isThrownBy(() -> MockRestRequestMatchers
211211
.header("foo", hasItem(endsWith("ba"))).match(this.request))
212-
.withMessage("Request header values for [foo]\n"
213-
+ "Expected: a collection containing a string ending with \"ba\"\n"
212+
.withMessage("Request header values for [foo]" + System.lineSeparator()
213+
+ "Expected: a collection containing a string ending with \"ba\"" + System.lineSeparator()
214214
+ " but: mismatches were: [was \"bar\", was \"baz\"]");
215215

216216
assertThatExceptionOfType(AssertionError.class).isThrownBy(() -> MockRestRequestMatchers
217217
.header("foo", everyItem(endsWith("ar"))).match(this.request))
218-
.withMessage("Request header values for [foo]\n"
219-
+ "Expected: every item is a string ending with \"ar\"\n"
218+
.withMessage("Request header values for [foo]" + System.lineSeparator()
219+
+ "Expected: every item is a string ending with \"ar\"" + System.lineSeparator()
220220
+ " but: an item was \"baz\"");
221221
}
222222

@@ -325,20 +325,20 @@ void queryParamListContainsMismatch() {
325325

326326
assertThatExceptionOfType(AssertionError.class).isThrownBy(() -> MockRestRequestMatchers
327327
.queryParam("foo", contains(containsString("ba"))).match(this.request))
328-
.withMessage("Request queryParam values for [foo]\n"
329-
+ "Expected: iterable containing [a string containing \"ba\"]\n"
328+
.withMessage("Request queryParam values for [foo]" + System.lineSeparator()
329+
+ "Expected: iterable containing [a string containing \"ba\"]" + System.lineSeparator()
330330
+ " but: not matched: \"baz\"");
331331

332332
assertThatExceptionOfType(AssertionError.class).isThrownBy(() -> MockRestRequestMatchers
333333
.queryParam("foo", hasItem(endsWith("ba"))).match(this.request))
334-
.withMessage("Request queryParam values for [foo]\n"
335-
+ "Expected: a collection containing a string ending with \"ba\"\n"
334+
.withMessage("Request queryParam values for [foo]" + System.lineSeparator()
335+
+ "Expected: a collection containing a string ending with \"ba\"" + System.lineSeparator()
336336
+ " but: mismatches were: [was \"bar\", was \"baz\"]");
337337

338338
assertThatExceptionOfType(AssertionError.class).isThrownBy(() -> MockRestRequestMatchers
339339
.queryParam("foo", everyItem(endsWith("ar"))).match(this.request))
340-
.withMessage("Request queryParam values for [foo]\n"
341-
+ "Expected: every item is a string ending with \"ar\"\n"
340+
.withMessage("Request queryParam values for [foo]" + System.lineSeparator()
341+
+ "Expected: every item is a string ending with \"ar\"" + System.lineSeparator()
342342
+ " but: an item was \"baz\"");
343343
}
344344

spring-webflux/src/main/kotlin/org/springframework/web/service/invoker/HttpServiceProxyFactoryExtensions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package org.springframework.web.service.invoker
1818

1919
/**
20-
* Extension for [HttpServiceProxyFactory.createClient] providing a `createClient<Foo>()` variant.
20+
* Extension for [HttpServiceProxyFactory.createClient] providing a `createClient<Foo>()` variant.
2121
*
2222
* @author Sebastien Deleuze
2323
* @since 6.0.5

0 commit comments

Comments
 (0)