Polishing

This commit is contained in:
Juergen Hoeller 2023-02-14 11:00:01 +01:00
parent f91b2249b3
commit d7824c7831
2 changed files with 4 additions and 5 deletions

View File

@ -519,7 +519,6 @@ public interface DataBuffer {
* A dedicated iterator type that ensures the lifecycle of iterated * A dedicated iterator type that ensures the lifecycle of iterated
* {@link ByteBuffer} elements. This iterator must be used in a * {@link ByteBuffer} elements. This iterator must be used in a
* try-with-resources clause or explicitly {@linkplain #close() closed}. * try-with-resources clause or explicitly {@linkplain #close() closed}.
*
* @see DataBuffer#readableByteBuffers() * @see DataBuffer#readableByteBuffers()
* @see DataBuffer#writableByteBuffers() * @see DataBuffer#writableByteBuffers()
*/ */
@ -527,7 +526,6 @@ public interface DataBuffer {
@Override @Override
void close(); void close();
} }
} }

View File

@ -65,6 +65,7 @@ import static org.mockito.Mockito.mock;
class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests { class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
private final Resource resource; private final Resource resource;
private final Path tempFile; private final Path tempFile;
@ -207,7 +208,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
.verify(); .verify();
} }
@ParameterizedDataBufferAllocatingTest // gh-22107 @ParameterizedDataBufferAllocatingTest // gh-22107
void readAsynchronousFileChannelCancelWithoutDemand(DataBufferFactory bufferFactory) throws Exception { void readAsynchronousFileChannelCancelWithoutDemand(DataBufferFactory bufferFactory) throws Exception {
super.bufferFactory = bufferFactory; super.bufferFactory = bufferFactory;
@ -790,7 +791,6 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
.consumeNextWith(stringConsumer("c")) .consumeNextWith(stringConsumer("c"))
.expectComplete() .expectComplete()
.verify(Duration.ofSeconds(5)); .verify(Duration.ofSeconds(5));
} }
private Answer<Integer> putByte(int b) { private Answer<Integer> putByte(int b) {
@ -833,7 +833,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
.verifyError(DataBufferLimitException.class); .verifyError(DataBufferLimitException.class);
} }
@Test // gh-26060 @Test // gh-26060
void joinWithLimitDoesNotOverRelease() { void joinWithLimitDoesNotOverRelease() {
NettyDataBufferFactory bufferFactory = new NettyDataBufferFactory(PooledByteBufAllocator.DEFAULT); NettyDataBufferFactory bufferFactory = new NettyDataBufferFactory(PooledByteBufAllocator.DEFAULT);
byte[] bytes = "foo-bar-baz".getBytes(StandardCharsets.UTF_8); byte[] bytes = "foo-bar-baz".getBytes(StandardCharsets.UTF_8);
@ -1006,6 +1006,7 @@ class DataBufferUtilsTests extends AbstractDataBufferAllocatingTests {
.verifyComplete(); .verifyComplete();
} }
private static class ZeroDemandSubscriber extends BaseSubscriber<DataBuffer> { private static class ZeroDemandSubscriber extends BaseSubscriber<DataBuffer> {
@Override @Override