Skip to content

Commit

Permalink
SPARK-3883: Refactored AkkaUtils.protocol method to not use Try
Browse files Browse the repository at this point in the history
  • Loading branch information
jacek-lewandowski committed Feb 2, 2015
1 parent 90a8762 commit 2532668
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/main/scala/org/apache/spark/util/AkkaUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,9 @@ private[spark] object AkkaUtils extends Logging {
}

def protocol(actorSystem: ActorSystem): String = {
protocol(Try {
actorSystem.settings.config.getBoolean("akka.remote.netty.tcp.enable-ssl")
}.getOrElse(false))
val akkaConf = actorSystem.settings.config
val sslProp = "akka.remote.netty.tcp.enable-ssl"
protocol(akkaConf.hasPath(sslProp) && akkaConf.getBoolean(sslProp))
}

def protocol(ssl: Boolean = false): String = {
Expand Down

0 comments on commit 2532668

Please sign in to comment.