Polishing
This commit is contained in:
parent
f87a87e29d
commit
979118c1eb
|
@ -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.
|
||||
*
|
||||
* <p><b>Note</b> 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.
|
||||
*
|
||||
* <p><b>Note</b> 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()
|
||||
*/
|
||||
|
|
|
@ -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\"");
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
package org.springframework.web.service.invoker
|
||||
|
||||
/**
|
||||
* Extension for [HttpServiceProxyFactory.createClient] providing a `createClient<Foo>()` variant.
|
||||
* Extension for [HttpServiceProxyFactory.createClient] providing a `createClient<Foo>()` variant.
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
* @since 6.0.5
|
||||
|
|
Loading…
Reference in New Issue