diff --git a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBuffer.java b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBuffer.java index 870bfd7c57..b436023517 100644 --- a/spring-core/src/main/java/org/springframework/core/io/buffer/DataBuffer.java +++ b/spring-core/src/main/java/org/springframework/core/io/buffer/DataBuffer.java @@ -421,11 +421,9 @@ public interface DataBuffer { * Copies the given length from this data buffer into the given destination * {@code ByteBuffer}, beginning at the given source position, and the * given destination position in the destination byte buffer. - * @param srcPos the position of this data buffer from where copying should - * start + * @param srcPos the position of this data buffer from where copying should start * @param dest the destination byte buffer - * @param destPos the position in {@code dest} to where copying should - * start + * @param destPos the position in {@code dest} to where copying should start * @param length the amount of data to copy * @since 6.0.5 */ @@ -436,7 +434,6 @@ public interface DataBuffer { * buffer that can be read. Calling this method is more efficient than * {@link #toByteBuffer()}, as no data is copied. However, the byte buffers * provided can only be used during the iteration. - * *
Note that the returned iterator must be used in a * try-with-resources clause or explicitly * {@linkplain ByteBufferIterator#close() closed}. @@ -449,7 +446,6 @@ public interface DataBuffer { * Returns a closeable iterator over each {@link ByteBuffer} in this data * buffer that can be written to. The byte buffers provided can only be used * during the iteration. - * *
Note that the returned iterator must be used in a
* try-with-resources clause or explicitly
* {@linkplain ByteBufferIterator#close() closed}.
@@ -519,6 +515,7 @@ public interface DataBuffer {
* A dedicated iterator type that ensures the lifecycle of iterated
* {@link ByteBuffer} elements. This iterator must be used in a
* try-with-resources clause or explicitly {@linkplain #close() closed}.
+ * @since 6.0.5
* @see DataBuffer#readableByteBuffers()
* @see DataBuffer#writableByteBuffers()
*/
diff --git a/spring-test/src/test/java/org/springframework/test/web/client/match/MockRestRequestMatchersTests.java b/spring-test/src/test/java/org/springframework/test/web/client/match/MockRestRequestMatchersTests.java
index 1e7dc6b262..a6e1565149 100644
--- a/spring-test/src/test/java/org/springframework/test/web/client/match/MockRestRequestMatchersTests.java
+++ b/spring-test/src/test/java/org/springframework/test/web/client/match/MockRestRequestMatchersTests.java
@@ -203,20 +203,20 @@ class MockRestRequestMatchersTests {
assertThatExceptionOfType(AssertionError.class).isThrownBy(() -> MockRestRequestMatchers
.header("foo", contains(containsString("ba"))).match(this.request))
- .withMessage("Request header values for [foo]\n"
- + "Expected: iterable containing [a string containing \"ba\"]\n"
+ .withMessage("Request header values for [foo]" + System.lineSeparator()
+ + "Expected: iterable containing [a string containing \"ba\"]" + System.lineSeparator()
+ " but: not matched: \"baz\"");
assertThatExceptionOfType(AssertionError.class).isThrownBy(() -> MockRestRequestMatchers
.header("foo", hasItem(endsWith("ba"))).match(this.request))
- .withMessage("Request header values for [foo]\n"
- + "Expected: a collection containing a string ending with \"ba\"\n"
+ .withMessage("Request header values for [foo]" + System.lineSeparator()
+ + "Expected: a collection containing a string ending with \"ba\"" + System.lineSeparator()
+ " but: mismatches were: [was \"bar\", was \"baz\"]");
assertThatExceptionOfType(AssertionError.class).isThrownBy(() -> MockRestRequestMatchers
.header("foo", everyItem(endsWith("ar"))).match(this.request))
- .withMessage("Request header values for [foo]\n"
- + "Expected: every item is a string ending with \"ar\"\n"
+ .withMessage("Request header values for [foo]" + System.lineSeparator()
+ + "Expected: every item is a string ending with \"ar\"" + System.lineSeparator()
+ " but: an item was \"baz\"");
}
@@ -325,20 +325,20 @@ class MockRestRequestMatchersTests {
assertThatExceptionOfType(AssertionError.class).isThrownBy(() -> MockRestRequestMatchers
.queryParam("foo", contains(containsString("ba"))).match(this.request))
- .withMessage("Request queryParam values for [foo]\n"
- + "Expected: iterable containing [a string containing \"ba\"]\n"
+ .withMessage("Request queryParam values for [foo]" + System.lineSeparator()
+ + "Expected: iterable containing [a string containing \"ba\"]" + System.lineSeparator()
+ " but: not matched: \"baz\"");
assertThatExceptionOfType(AssertionError.class).isThrownBy(() -> MockRestRequestMatchers
.queryParam("foo", hasItem(endsWith("ba"))).match(this.request))
- .withMessage("Request queryParam values for [foo]\n"
- + "Expected: a collection containing a string ending with \"ba\"\n"
+ .withMessage("Request queryParam values for [foo]" + System.lineSeparator()
+ + "Expected: a collection containing a string ending with \"ba\"" + System.lineSeparator()
+ " but: mismatches were: [was \"bar\", was \"baz\"]");
assertThatExceptionOfType(AssertionError.class).isThrownBy(() -> MockRestRequestMatchers
.queryParam("foo", everyItem(endsWith("ar"))).match(this.request))
- .withMessage("Request queryParam values for [foo]\n"
- + "Expected: every item is a string ending with \"ar\"\n"
+ .withMessage("Request queryParam values for [foo]" + System.lineSeparator()
+ + "Expected: every item is a string ending with \"ar\"" + System.lineSeparator()
+ " but: an item was \"baz\"");
}
diff --git a/spring-webflux/src/main/kotlin/org/springframework/web/service/invoker/HttpServiceProxyFactoryExtensions.kt b/spring-webflux/src/main/kotlin/org/springframework/web/service/invoker/HttpServiceProxyFactoryExtensions.kt
index 9f08352bcb..3eccf93cc0 100644
--- a/spring-webflux/src/main/kotlin/org/springframework/web/service/invoker/HttpServiceProxyFactoryExtensions.kt
+++ b/spring-webflux/src/main/kotlin/org/springframework/web/service/invoker/HttpServiceProxyFactoryExtensions.kt
@@ -17,7 +17,7 @@
package org.springframework.web.service.invoker
/**
- * Extension for [HttpServiceProxyFactory.createClient] providing a `createClient