@ -87,34 +87,28 @@ public class DefaultDataBufferFactory implements DataBufferFactory {
@@ -87,34 +87,28 @@ public class DefaultDataBufferFactory implements DataBufferFactory {
@ -123,6 +117,7 @@ public class DefaultDataBufferFactory implements DataBufferFactory {
@@ -123,6 +117,7 @@ public class DefaultDataBufferFactory implements DataBufferFactory {
@ -43,7 +44,7 @@ public class NettyDataBuffer implements PooledDataBuffer {
@@ -43,7 +44,7 @@ public class NettyDataBuffer implements PooledDataBuffer {
@ -69,7 +70,7 @@ public class NettyDataBuffer implements PooledDataBuffer {
@@ -69,7 +70,7 @@ public class NettyDataBuffer implements PooledDataBuffer {
Assert.notNull(predicate,"'predicate' must not be null");
Assert.notNull(predicate,"IntPredicate must not be null");
if(fromIndex<0){
fromIndex=0;
}
@ -82,7 +83,7 @@ public class NettyDataBuffer implements PooledDataBuffer {
@@ -82,7 +83,7 @@ public class NettyDataBuffer implements PooledDataBuffer {
Assert.notNull(predicate,"'predicate' must not be null");
Assert.notNull(predicate,"IntPredicate must not be null");
if(fromIndex<0){
return-1;
}
@ -175,9 +176,7 @@ public class NettyDataBuffer implements PooledDataBuffer {
@@ -175,9 +176,7 @@ public class NettyDataBuffer implements PooledDataBuffer {
@Override
publicNettyDataBufferwrite(DataBuffer...buffers){
Assert.notNull(buffers,"'buffers' must not be null");
if(buffers.length>0){
if(!ObjectUtils.isEmpty(buffers)){
if(hasNettyDataBuffers(buffers)){
ByteBuf[]nativeBuffers=Arrays.stream(buffers)
.map(b->((NettyDataBuffer)b).getNativeBuffer())
@ -194,9 +193,9 @@ public class NettyDataBuffer implements PooledDataBuffer {
@@ -194,9 +193,9 @@ public class NettyDataBuffer implements PooledDataBuffer {
@ -205,25 +204,25 @@ public class NettyDataBuffer implements PooledDataBuffer {
@@ -205,25 +204,25 @@ public class NettyDataBuffer implements PooledDataBuffer {
@Override
publicNettyDataBufferwrite(ByteBuffer...buffers){
Assert.notNull(buffers,"'buffers' must not be null");
Assert.notNull(byteBufs,"'byteBufs' must not be null");
for(ByteBufbyteBuf:byteBufs){
this.byteBuf.writeBytes(byteBuf);
if(!ObjectUtils.isEmpty(byteBufs)){
for(ByteBufbyteBuf:byteBufs){
this.byteBuf.writeBytes(byteBuf);
}
}
returnthis;
}
@ -272,7 +271,7 @@ public class NettyDataBuffer implements PooledDataBuffer {
@@ -272,7 +271,7 @@ public class NettyDataBuffer implements PooledDataBuffer {
@ -42,7 +42,7 @@ public class NettyDataBufferFactory implements DataBufferFactory {
@@ -42,7 +42,7 @@ public class NettyDataBufferFactory implements DataBufferFactory {
@ -52,6 +52,7 @@ public class NettyDataBufferFactory implements DataBufferFactory {
@@ -52,6 +52,7 @@ public class NettyDataBufferFactory implements DataBufferFactory {
@ -133,4 +134,5 @@ public class NettyDataBufferFactory implements DataBufferFactory {
@@ -133,4 +134,5 @@ public class NettyDataBufferFactory implements DataBufferFactory {