From d4f95d4ab79aa74d330177a71b8a3412ee4c899f Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Fri, 16 Aug 2013 16:03:03 +0200 Subject: [PATCH] !act #3526 Make SupervisorStrategy.logFailure public * This change is not source compatible since anyone that has overridden logFailure will have compilation error "has weaker access privileges; it should be public" --- akka-actor/src/main/scala/akka/actor/FaultHandling.scala | 2 +- akka-actor/src/main/scala/akka/io/SelectionHandler.scala | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/akka-actor/src/main/scala/akka/actor/FaultHandling.scala b/akka-actor/src/main/scala/akka/actor/FaultHandling.scala index 58dd06c5e7..2a8534542e 100644 --- a/akka-actor/src/main/scala/akka/actor/FaultHandling.scala +++ b/akka-actor/src/main/scala/akka/actor/FaultHandling.scala @@ -325,7 +325,7 @@ abstract class SupervisorStrategy { * `Resume` failures are logged at `Warning` level. * `Stop` and `Restart` failures are logged at `Error` level. */ - protected def logFailure(context: ActorContext, child: ActorRef, cause: Throwable, decision: Directive): Unit = + def logFailure(context: ActorContext, child: ActorRef, cause: Throwable, decision: Directive): Unit = if (loggingEnabled) { val logMessage = cause match { case e: ActorInitializationException if e.getCause ne null ⇒ e.getCause.getMessage diff --git a/akka-actor/src/main/scala/akka/io/SelectionHandler.scala b/akka-actor/src/main/scala/akka/io/SelectionHandler.scala index ceaeadf98c..e37e387737 100644 --- a/akka-actor/src/main/scala/akka/io/SelectionHandler.scala +++ b/akka-actor/src/main/scala/akka/io/SelectionHandler.scala @@ -93,8 +93,8 @@ private[io] object SelectionHandler { */ private[io] final val connectionSupervisorStrategy: SupervisorStrategy = new OneForOneStrategy()(SupervisorStrategy.stoppingStrategy.decider) { - override protected def logFailure(context: ActorContext, child: ActorRef, cause: Throwable, - decision: SupervisorStrategy.Directive): Unit = + override def logFailure(context: ActorContext, child: ActorRef, cause: Throwable, + decision: SupervisorStrategy.Directive): Unit = if (cause.isInstanceOf[DeathPactException]) { try context.system.eventStream.publish { Logging.Debug(child.path.toString, getClass, "Closed after handler termination") @@ -252,8 +252,8 @@ private[io] class SelectionHandler(settings: SelectionHandlerSettings) extends A case _: Exception ⇒ SupervisorStrategy.Stop } new OneForOneStrategy()(stoppingDecider) { - override protected def logFailure(context: ActorContext, child: ActorRef, cause: Throwable, - decision: SupervisorStrategy.Directive): Unit = + override def logFailure(context: ActorContext, child: ActorRef, cause: Throwable, + decision: SupervisorStrategy.Directive): Unit = try { val logMessage = cause match { case e: ActorInitializationException if e.getCause ne null ⇒ e.getCause.getMessage