mirror of
https://github.com/google/nomulus
synced 2026-08-31 21:27:09 +00:00
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:
+30
-26
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user