Fix a few lint errors (#361)

Replace deprecated bouncycastle class in SslInitializerTestUils.

Generic array as vargs: worked around it in ProbingAction and
removed unused method in CircularList.
This commit is contained in:
Weimin Yu
2019-11-12 11:14:51 -05:00
committed by GitHub
parent bce09a3aa3
commit b005e3aeb0
3 changed files with 61 additions and 46 deletions
@@ -155,33 +155,37 @@ public abstract class ProbingAction implements Callable<ChannelFuture> {
// Write appropriate outboundMessage to pipeline
ChannelFuture unusedFutureWriteAndFlush =
channel().writeAndFlush(outboundMessage());
channelFuture.addListeners(
future -> {
if (future.isSuccess()) {
ChannelFuture unusedFuture = finished.setSuccess();
} else {
ChannelFuture unusedFuture = finished.setFailure(future.cause());
}
},
// If we don't have a persistent connection, close the connection to this
// channel
future -> {
if (!protocol().persistentConnection()) {
channelFuture
.addListener(
future -> {
if (future.isSuccess()) {
ChannelFuture unusedFuture = finished.setSuccess();
} else {
ChannelFuture unusedFuture = finished.setFailure(future.cause());
}
})
.addListener(
// If we don't have a persistent connection, close the connection to
// this
// channel
future -> {
if (!protocol().persistentConnection()) {
ChannelFuture closedFuture = channel().close();
closedFuture.addListener(
f -> {
if (f.isSuccess()) {
logger.atInfo().log(
"Closed stale channel. Moving on to next ProbingStep");
} else {
logger.atWarning().log(
"Issue closing stale channel. Most likely already "
+ "closed.");
}
});
}
});
ChannelFuture closedFuture = channel().close();
closedFuture.addListener(
f -> {
if (f.isSuccess()) {
logger.atInfo().log(
"Closed stale channel. Moving on to next"
+ " ProbingStep");
} else {
logger.atWarning().log(
"Issue closing stale channel. Most likely already "
+ "closed.");
}
});
}
});
},
delay().getStandardSeconds(),
TimeUnit.SECONDS);