Fix compiler warnings in akka-remote, akka-actor-typed. (#26139)

Fix compiler warnings in akka-remote, akka-actor-typed. (#26139)
This commit is contained in:
Helena Edelson 2018-12-20 09:10:54 -08:00 committed by GitHub
parent 15e2527629
commit 408fab3313
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 144 additions and 151 deletions

View file

@ -106,7 +106,7 @@ private[remote] object Remoting {
private[Remoting] class TransportSupervisor extends Actor with RequiresMessageQueue[UnboundedMessageQueueSemantics] {
override def supervisorStrategy = OneForOneStrategy() {
case NonFatal(e) Restart
case NonFatal(_) Restart
}
def receive = {
@ -327,7 +327,7 @@ private[remote] object EndpointManager {
def registerWritableEndpointUid(remoteAddress: Address, uid: Int): Unit = {
addressToWritable.get(remoteAddress) match {
case Some(Pass(ep, _)) addressToWritable += remoteAddress Pass(ep, Some(uid))
case other
case _
}
}
@ -482,7 +482,7 @@ private[remote] class EndpointManager(conf: Config, log: LoggingAdapter) extends
override val supervisorStrategy = {
def hopeless(e: HopelessAssociation): SupervisorStrategy.Directive = e match {
case HopelessAssociation(localAddress, remoteAddress, Some(uid), reason)
case HopelessAssociation(_, remoteAddress, Some(uid), reason)
log.error(reason, "Association to [{}] with UID [{}] irrecoverably failed. Quarantining address.",
remoteAddress, uid)
settings.QuarantineDuration match {
@ -493,7 +493,7 @@ private[remote] class EndpointManager(conf: Config, log: LoggingAdapter) extends
}
Stop
case HopelessAssociation(localAddress, remoteAddress, None, _)
case HopelessAssociation(_, remoteAddress, None, _)
keepQuarantinedOr(remoteAddress) {
log.warning(
"Association to [{}] with unknown UID is irrecoverably failed. " +
@ -505,7 +505,7 @@ private[remote] class EndpointManager(conf: Config, log: LoggingAdapter) extends
}
OneForOneStrategy(loggingEnabled = false) {
case e @ InvalidAssociation(localAddress, remoteAddress, reason, disassiciationInfo)
case InvalidAssociation(localAddress, remoteAddress, reason, disassiciationInfo)
keepQuarantinedOr(remoteAddress) {
val causedBy = if (reason.getCause == null) "" else s"Caused by: [${reason.getCause.getMessage}]"
log.warning(
@ -522,7 +522,7 @@ private[remote] class EndpointManager(conf: Config, log: LoggingAdapter) extends
}
Stop
case ShutDownAssociation(localAddress, remoteAddress, _)
case ShutDownAssociation(_, remoteAddress, _)
keepQuarantinedOr(remoteAddress) {
log.debug(
"Remote system with address [{}] has shut down. " +
@ -655,7 +655,7 @@ private[remote] class EndpointManager(conf: Config, log: LoggingAdapter) extends
}
}
case s @ Send(message, senderOption, recipientRef, _)
case s @ Send(_, _, recipientRef, _)
val recipientAddress = recipientRef.path.address
def createAndRegisterWritingEndpoint(): ActorRef = {
@ -677,7 +677,7 @@ private[remote] class EndpointManager(conf: Config, log: LoggingAdapter) extends
case Some(Gated(timeOfRelease))
if (timeOfRelease.isOverdue()) createAndRegisterWritingEndpoint() ! s
else extendedSystem.deadLetters ! s
case Some(Quarantined(uid, _))
case Some(Quarantined(_, _))
// timeOfRelease is only used for garbage collection reasons, therefore it is ignored here. We still have
// the Quarantined tombstone and we know what UID we don't want to accept, so use it.
createAndRegisterWritingEndpoint() ! s
@ -686,7 +686,7 @@ private[remote] class EndpointManager(conf: Config, log: LoggingAdapter) extends
}
case ia @ InboundAssociation(handle: AkkaProtocolHandle)
case ia @ InboundAssociation(_: AkkaProtocolHandle)
handleInboundAssociation(ia, writerIsIdle = false)
case EndpointWriter.StoppedReading(endpoint)
acceptPendingReader(takingOverFrom = endpoint)
@ -776,10 +776,11 @@ private[remote] class EndpointManager(conf: Config, log: LoggingAdapter) extends
endpoints.markAsQuarantined(handle.remoteAddress, uid, Deadline.now + settings.QuarantineDuration)
createAndRegisterEndpoint(handle)
}
case state
case _
createAndRegisterEndpoint(handle)
}
}
case _ // ignore
}
private def createAndRegisterEndpoint(handle: AkkaProtocolHandle): Unit = {