Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to v1.6.0-RC1 #22

Open
wants to merge 1 commit into
base: v1.5.1-newdefaults
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ object CreateWorkflow extends Logging {
p.split('=') match {
case Array(k, v) => List(k -> v)
case _ => Nil
})
})
.toMap)
.getOrElse(Map())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ object MetricDevSuite {
class QOptionAverageMetric
extends OptionAverageMetric[EmptyParams, Int, Int, Int] {
def calculate(q: Int, p: Int, a: Int): Option[Double] = {
if (q < 0) { None } else { Some(q.toDouble) }
if (q < 0) {
None
} else {
Some(q.toDouble)
}
}
}

Expand All @@ -48,7 +52,11 @@ object MetricDevSuite {
class QOptionStdevMetric
extends OptionStdevMetric[EmptyParams, Int, Int, Int] {
def calculate(q: Int, p: Int, a: Int): Option[Double] = {
if (q < 0) { None } else { Some(q.toDouble) }
if (q < 0) {
None
} else {
Some(q.toDouble)
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ class Stats(val startTime: DateTime) {
m: mutable.Map[(Int, K), V]): Seq[KV[K, V]] = {
m.toSeq.flatMap {
case (k, v) =>
if (k._1 == appId) { Seq(KV(k._2, v)) } else { Seq() }
if (k._1 == appId) {
Seq(KV(k._2, v))
} else {
Seq()
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class EngineManifestSerializer
t match {
case JString(file) => file
case _ => ""
}))
}))
case JField("engineFactory", JString(engineFactory)) =>
enginemanifest.copy(engineFactory = engineFactory)
case _ => enginemanifest
Expand All @@ -113,9 +113,10 @@ class EngineManifestSerializer
.map(x => JString(x))
.getOrElse(JNothing)) :: JField(
"files",
JArray(enginemanifest.files
.map(x => JString(x))
.toList)) :: JField(
JArray(
enginemanifest.files
.map(x => JString(x))
.toList)) :: JField(
"engineFactory",
JString(enginemanifest.engineFactory)) :: Nil)
}))
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ object EventJson4sSupport {
// disable tags from API for now
JField("prId", d.prId.map(JString(_)).getOrElse(JNothing)) :: // don't show creationTime for now
JField(
"creationTime",
JString(DataUtils.dateTimeToString(d.creationTime))) :: Nil)
"creationTime",
JString(DataUtils.dateTimeToString(d.creationTime))) :: Nil)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ object Storage extends Logging {
error(e.getMessage)
errors += 1
r -> DataObjectMeta("", "")
})
})
.toMap

if (errors > 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ object CommonParams {
itemSimilarity = "LogLikelihoodSimilarity",
weighted = false,
nearestN = 10,
threshold = 4.9E-324,
threshold = 4.9e-324,
numSimilarItems = 50,
numUserActions = 50,
freshness = 0,
Expand Down Expand Up @@ -75,8 +75,8 @@ object Evaluation1 {
val engineParams = new EngineParams(
dataSourceParams = dsp,
preparatorParams = CommonParams.PreparatorParams,
algorithmParamsList =
Seq(("mahoutItemBased", CommonParams.MahoutAlgoParams0))
algorithmParamsList = Seq(
("mahoutItemBased", CommonParams.MahoutAlgoParams0))
)

// Evaluator Setting
Expand Down Expand Up @@ -107,8 +107,8 @@ object Evaluation2 {
val engineParams = new EngineParams(
dataSourceParams = CommonParams.CompleteDataSourceParams,
preparatorParams = CommonParams.PreparatorParams,
algorithmParamsList =
Seq(("mahoutItemBased", CommonParams.MahoutAlgoParams0))
algorithmParamsList = Seq(
("mahoutItemBased", CommonParams.MahoutAlgoParams0))
)

// Evaluator Setting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ object ItemRecEvaluation1 {
booleanData = true,
itemSimilarity = "LogLikelihoodSimilarity",
weighted = false,
threshold = 4.9E-324,
threshold = 4.9e-324,
nearestN = 10,
unseenOnly = false,
freshness = 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ object Runner extends Logging {
p.split('=') match {
case Array(k, v) => List(k -> v)
case _ => Nil
})
})
.toMap

def argumentValue(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class ActorDSLSpec extends AkkaSpec {
//#supervise-with
val child = actor("child")(new Act {
whenFailing { (_, _) ⇒
}
}
become {
case ref: ActorRef ⇒ whenStopping(ref ! "stopped")
case ex: Exception ⇒ throw ex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ object ActorWithBoundedStashSpec {
def receive = {
case msg: String if msg.startsWith("hello") ⇒
numStashed += 1
try { stash(); sender() ! "ok" } catch {
try {
stash(); sender() ! "ok"
} catch {
case _: StashOverflowException ⇒
if (numStashed == 21) {
sender() ! "STASHOVERFLOW"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class LocalActorRefProviderSpec
case Some(Success(a: ActorRef)) ⇒ 1
case Some(Failure(ex: InvalidActorNameException)) ⇒ 2
case x ⇒ x
})
})
set should ===(Set[Any](1, 2))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ private[akka] class ActorCell(
def become(behavior: Actor.Receive, discardOld: Boolean = true): Unit =
behaviorStack = behavior ::
(if (discardOld && behaviorStack.nonEmpty) behaviorStack.tail
else behaviorStack)
else behaviorStack)

def become(behavior: Procedure[Any]): Unit =
become(behavior, discardOld = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class LightArrayRevolverScheduler(

import LightArrayRevolverScheduler._

private val oneNs = Duration.fromNanos(1l)
private val oneNs = Duration.fromNanos(1L)
private def roundUp(d: FiniteDuration): FiniteDuration =
try {
((d + TickDuration - oneNs) / TickDuration).toLong * TickDuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,9 @@ object TypedActor
}
case m if m.returnsJOption || m.returnsOption ⇒
val f = ask(actor, m)(timeout)
(try { Await.ready(f, timeout.duration).value } catch {
(try {
Await.ready(f, timeout.duration).value
} catch {
case _: TimeoutException ⇒ None
}) match {
case None | Some(Success(NullResponse)) | Some(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -505,18 +505,21 @@ object ForkJoinExecutorConfigurator {
final class AkkaForkJoinTask(runnable: Runnable) extends ForkJoinTask[Unit] {
override def getRawResult(): Unit = ()
override def setRawResult(unit: Unit): Unit = ()
final override def exec(): Boolean = try { runnable.run(); true } catch {
case ie: InterruptedException ⇒
Thread.currentThread.interrupt()
false
case anything: Throwable ⇒
val t = Thread.currentThread
t.getUncaughtExceptionHandler match {
case null ⇒
case some ⇒ some.uncaughtException(t, anything)
}
throw anything
}
final override def exec(): Boolean =
try {
runnable.run(); true
} catch {
case ie: InterruptedException ⇒
Thread.currentThread.interrupt()
false
case anything: Throwable ⇒
val t = Thread.currentThread
t.getUncaughtExceptionHandler match {
case null ⇒
case some ⇒ some.uncaughtException(t, anything)
}
throw anything
}
}
}

Expand Down
27 changes: 15 additions & 12 deletions repos/akka/akka-actor/src/main/scala/akka/dispatch/Mailbox.scala
Original file line number Diff line number Diff line change
Expand Up @@ -276,18 +276,21 @@ private[akka] abstract class Mailbox(val messageQueue: MessageQueue)

override final def getRawResult(): Unit = ()
override final def setRawResult(unit: Unit): Unit = ()
final override def exec(): Boolean = try { run(); false } catch {
case ie: InterruptedException ⇒
Thread.currentThread.interrupt()
false
case anything: Throwable ⇒
val t = Thread.currentThread
t.getUncaughtExceptionHandler match {
case null ⇒
case some ⇒ some.uncaughtException(t, anything)
}
throw anything
}
final override def exec(): Boolean =
try {
run(); false
} catch {
case ie: InterruptedException ⇒
Thread.currentThread.interrupt()
false
case anything: Throwable ⇒
val t = Thread.currentThread
t.getUncaughtExceptionHandler match {
case null ⇒
case some ⇒ some.uncaughtException(t, anything)
}
throw anything
}

/**
* Process the messages in the mailbox
Expand Down
10 changes: 8 additions & 2 deletions repos/akka/akka-actor/src/main/scala/akka/event/EventBus.scala
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,11 @@ trait ManagedActorClassification {
}
}

try { dissociateAsMonitored(actor) } finally { dissociateAsMonitor(actor) }
try {
dissociateAsMonitored(actor)
} finally {
dissociateAsMonitor(actor)
}
}

@tailrec
Expand Down Expand Up @@ -528,7 +532,9 @@ trait ActorClassification {
}
}

try { dissociateAsMonitored(monitored) } finally {
try {
dissociateAsMonitored(monitored)
} finally {
dissociateAsMonitor(monitored)
}
}
Expand Down
Loading