Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
TAKETODAY committed Dec 16, 2024
1 parent 1519541 commit 740f090
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@
import infra.lang.Assert;
import infra.lang.Constant;
import infra.lang.Nullable;
import infra.logging.Logger;
import infra.logging.LoggerFactory;
import infra.util.ObjectUtils;
import reactor.core.publisher.BaseSubscriber;
import reactor.core.publisher.Flux;
Expand All @@ -70,8 +68,6 @@
*/
public abstract class DataBufferUtils {

final static Logger logger = LoggerFactory.getLogger(DataBufferUtils.class);

//---------------------------------------------------------------------
// Reading
//---------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import infra.lang.Assert;
import infra.lang.Nullable;
import infra.logging.Logger;
import infra.logging.LoggerFactory;
import io.netty5.buffer.Buffer;
import io.netty5.buffer.BufferComponent;
import io.netty5.buffer.ComponentIterator;
Expand All @@ -39,6 +41,8 @@
*/
public final class Netty5DataBuffer extends DataBuffer implements AutoCloseable {

private final static Logger logger = LoggerFactory.getLogger(Netty5DataBuffer.class);

private final Buffer buffer;

private final Netty5DataBufferFactory dataBufferFactory;
Expand Down Expand Up @@ -305,8 +309,8 @@ public boolean release() {
this.buffer.close();
}
catch (IllegalStateException ex) {
if (DataBufferUtils.logger.isDebugEnabled()) {
DataBufferUtils.logger.debug("Failed to release DataBuffer {}", this, ex);
if (logger.isDebugEnabled()) {
logger.debug("Failed to release DataBuffer {}", this, ex);
}
}
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@

import infra.lang.Assert;
import infra.lang.Nullable;
import infra.logging.Logger;
import infra.logging.LoggerFactory;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufUtil;
import io.netty.buffer.Unpooled;

import static infra.core.io.buffer.DataBufferUtils.logger;

/**
* Implementation of the {@code DataBuffer} interface that wraps a Netty
* {@link ByteBuf}. Typically constructed with {@link NettyDataBufferFactory}.
Expand All @@ -42,6 +42,8 @@
*/
public class NettyDataBuffer extends DataBuffer {

private final static Logger logger = LoggerFactory.getLogger(NettyDataBuffer.class);

private ByteBuf byteBuf;

private final NettyDataBufferFactory dataBufferFactory;
Expand Down

0 comments on commit 740f090

Please sign in to comment.