Motivation: There are some extra log level checks (logger.isWarnEnabled()). Modification: Remove log level checks (logger.isWarnEnabled()) from io.netty.channel.epoll.AbstractEpollStreamChannel, io.netty.channel.DefaultFileRegion, io.netty.channel.nio.AbstractNioChannel, io.netty.util.HashedWheelTimer, io.netty.handler.stream.ChunkedWriteHandler and io.netty.channel.udt.nio.NioUdtMessageConnectorChannel Result: Fixes #9456
This commit is contained in:
parent
291f80733a
commit
21b7e29ea7
@ -270,10 +270,8 @@ public class HashedWheelTimer implements Timer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (duration < MILLISECOND_NANOS) {
|
if (duration < MILLISECOND_NANOS) {
|
||||||
if (logger.isWarnEnabled()) {
|
|
||||||
logger.warn("Configured tickDuration {} smaller then {}, using 1ms.",
|
logger.warn("Configured tickDuration {} smaller then {}, using 1ms.",
|
||||||
tickDuration, MILLISECOND_NANOS);
|
tickDuration, MILLISECOND_NANOS);
|
||||||
}
|
|
||||||
this.tickDuration = MILLISECOND_NANOS;
|
this.tickDuration = MILLISECOND_NANOS;
|
||||||
} else {
|
} else {
|
||||||
this.tickDuration = duration;
|
this.tickDuration = duration;
|
||||||
|
@ -119,11 +119,9 @@ public class ChunkedWriteHandler extends ChannelDuplexHandler {
|
|||||||
try {
|
try {
|
||||||
doFlush(ctx);
|
doFlush(ctx);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if (logger.isWarnEnabled()) {
|
|
||||||
logger.warn("Unexpected exception while sending chunks.", e);
|
logger.warn("Unexpected exception while sending chunks.", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
|
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
|
||||||
|
@ -701,12 +701,10 @@ public abstract class AbstractEpollStreamChannel extends AbstractEpollChannel im
|
|||||||
try {
|
try {
|
||||||
fd.close();
|
fd.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
if (logger.isWarnEnabled()) {
|
|
||||||
logger.warn("Error while closing a pipe", e);
|
logger.warn("Error while closing a pipe", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
class EpollStreamUnsafe extends AbstractEpollUnsafe {
|
class EpollStreamUnsafe extends AbstractEpollUnsafe {
|
||||||
// Overridden here just to be able to access this method from AbstractEpollStreamChannel
|
// Overridden here just to be able to access this method from AbstractEpollStreamChannel
|
||||||
|
@ -79,10 +79,8 @@ public class NioUdtMessageConnectorChannel extends AbstractNioMessageChannel imp
|
|||||||
try {
|
try {
|
||||||
channelUDT.close();
|
channelUDT.close();
|
||||||
} catch (final Exception e2) {
|
} catch (final Exception e2) {
|
||||||
if (logger.isWarnEnabled()) {
|
|
||||||
logger.warn("Failed to close channel.", e2);
|
logger.warn("Failed to close channel.", e2);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
throw new ChannelException("Failed to configure channel.", e);
|
throw new ChannelException("Failed to configure channel.", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -161,11 +161,9 @@ public class DefaultFileRegion extends AbstractReferenceCounted implements FileR
|
|||||||
try {
|
try {
|
||||||
file.close();
|
file.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
if (logger.isWarnEnabled()) {
|
|
||||||
logger.warn("Failed to close a file.", e);
|
logger.warn("Failed to close a file.", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FileRegion retain() {
|
public FileRegion retain() {
|
||||||
|
@ -86,11 +86,9 @@ public abstract class AbstractNioChannel extends AbstractChannel {
|
|||||||
try {
|
try {
|
||||||
ch.close();
|
ch.close();
|
||||||
} catch (IOException e2) {
|
} catch (IOException e2) {
|
||||||
if (logger.isWarnEnabled()) {
|
|
||||||
logger.warn(
|
logger.warn(
|
||||||
"Failed to close a partially initialized socket.", e2);
|
"Failed to close a partially initialized socket.", e2);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
throw new ChannelException("Failed to enter non-blocking mode.", e);
|
throw new ChannelException("Failed to enter non-blocking mode.", e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user