Skip to content

Commit

Permalink
Fix checkstyle warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
violetagg committed Jun 2, 2022
1 parent 7cba668 commit 260cd97
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
Expand Up @@ -91,7 +91,8 @@ public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise)
promise.addListener(future -> {
try {
recordWrite(address);
} catch (RuntimeException e) {
}
catch (RuntimeException e) {
log.warn("Exception caught while recording metrics.", e);
// Allow request-response exchange to continue, unaffected by metrics problem
}
Expand All @@ -116,7 +117,8 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) {
recordRead(ctx.channel().remoteAddress());
reset();
}
} catch (RuntimeException e) {
}
catch (RuntimeException e) {
log.warn("Exception caught while recording metrics.", e);
// Allow request-response exchange to continue, unaffected by metrics problem
}
Expand All @@ -127,7 +129,8 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) {
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
try {
recordException(ctx);
} catch (RuntimeException e) {
}
catch (RuntimeException e) {
log.warn("Exception caught while recording metrics.", e);
// Allow request-response exchange to continue, unaffected by metrics problem
}
Expand Down
Expand Up @@ -31,7 +31,6 @@
import reactor.util.annotation.Nullable;

import java.time.Duration;
import java.util.function.Consumer;
import java.util.function.Function;

/**
Expand Down Expand Up @@ -115,7 +114,8 @@ public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise)
recordInactiveConnection(ops);
}
}
} catch (RuntimeException e) {
}
catch (RuntimeException e) {
log.warn("Exception caught while recording metrics.", e);
// Allow request-response exchange to continue, unaffected by metrics problem
}
Expand Down Expand Up @@ -154,7 +154,8 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) {

dataReceived = 0;
}
} catch (RuntimeException e) {
}
catch (RuntimeException e) {
log.warn("Exception caught while recording metrics.", e);
// Allow request-response exchange to continue, unaffected by metrics problem
}
Expand All @@ -171,7 +172,8 @@ public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
// Always take the remote address from the operations in order to consider proxy information
recordException(ops, uriTagValue == null ? ops.path : uriTagValue.apply(ops.path));
}
} catch (RuntimeException e) {
}
catch (RuntimeException e) {
log.warn("Exception caught while recording metrics.", e);
// Allow request-response exchange to continue, unaffected by metrics problem
}
Expand Down

0 comments on commit 260cd97

Please sign in to comment.