From 57e5976996b71c454c75777b42ed17f0d7304ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martynas=20Mickevi=C4=8Dius?= Date: Mon, 13 Apr 2015 20:10:59 +0300 Subject: [PATCH] =str minor typo fixes and scala version bump --- .../src/main/scala/akka/stream/impl/StreamLayout.scala | 10 +++++----- .../scala/akka/stream/impl/fusing/Interpreter.scala | 8 ++++---- .../src/main/scala/akka/stream/scaladsl/Flow.scala | 2 +- .../src/main/scala/akka/stream/scaladsl/Graph.scala | 4 ++-- .../src/main/scala/akka/stream/stage/Stage.scala | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/akka-stream/src/main/scala/akka/stream/impl/StreamLayout.scala b/akka-stream/src/main/scala/akka/stream/impl/StreamLayout.scala index 53d568d779..5eb21dfbf6 100644 --- a/akka-stream/src/main/scala/akka/stream/impl/StreamLayout.scala +++ b/akka-stream/src/main/scala/akka/stream/impl/StreamLayout.scala @@ -15,7 +15,7 @@ import scala.collection.mutable private[akka] object StreamLayout { // compile-time constant - val debug = true + final val Debug = true // TODO: Materialization order // TODO: Special case linear composites @@ -51,7 +51,7 @@ private[akka] object StreamLayout { this.grow(that, f).connect(from, to) def connect[A, B](from: OutPort, to: InPort): Module = { - if (debug) validate() + if (Debug) validate() require(outPorts(from), if (downstreams.contains(from)) s"The output port [$from] is already connected" @@ -69,7 +69,7 @@ private[akka] object StreamLayout { } def transformMaterializedValue(f: Any ⇒ Any): Module = { - if (debug) validate() + if (Debug) validate() CompositeModule( subModules = if (this.isAtomic) Set(this) else this.subModules, @@ -82,7 +82,7 @@ private[akka] object StreamLayout { def grow(that: Module): Module = grow(that, Keep.left) def grow[A, B, C](that: Module, f: (A, B) ⇒ C): Module = { - if (debug) validate() + if (Debug) validate() require(that ne this, "A module cannot be added to itself. You should pass a separate instance to grow().") require(!subModules(that), "An existing submodule cannot be added again. All contained modules must be unique.") @@ -101,7 +101,7 @@ private[akka] object StreamLayout { } def wrap(): Module = { - if (debug) validate() + if (Debug) validate() CompositeModule( subModules = Set(this), diff --git a/akka-stream/src/main/scala/akka/stream/impl/fusing/Interpreter.scala b/akka-stream/src/main/scala/akka/stream/impl/fusing/Interpreter.scala index 0f40bd0bd7..49492ad379 100644 --- a/akka-stream/src/main/scala/akka/stream/impl/fusing/Interpreter.scala +++ b/akka-stream/src/main/scala/akka/stream/impl/fusing/Interpreter.scala @@ -73,7 +73,7 @@ private[akka] object OneBoundedInterpreter { * - The on-stack reentrant implementation by Mathias Doenitz -- the difference here that reentrancy is handled by the * interpreter itself, not user code, and the interpreter is able to use the heap when needed instead of the * callstack. - * - The pinball interpreter by Endre Sándor Varga -- the difference here that the restricition for "one ball" is + * - The pinball interpreter by Endre Sándor Varga -- the difference here that the restriction for "one ball" is * lifted by using isolated execution regions, completion handling is introduced and communication with the external * world is done via boundary ops. * @@ -134,8 +134,8 @@ private[akka] object OneBoundedInterpreter { * it is immediately replaced by an artificial Finished op which makes sure that the two execution paths are isolated * forever. * - ctx.fail() which is similar to finish() - * - ctx.pushAndPull() which (as a response to a previous ctx.hold()) starts a wawe of downstream push and upstream - * pull. The two execution paths are isolated by the op itself since onPull() from downstream can only answered by hold or + * - ctx.pushAndPull() which (as a response to a previous ctx.hold()) starts a wave of downstream push and upstream + * pull. The two execution paths are isolated by the op itself since onPull() from downstream can only be answered by hold or * push, while onPush() from upstream can only answered by hold or pull -- it is impossible to "cross" the op. * - ctx.pushAndFinish() which is different from the forking ops above because the execution of push and finish happens on * the same execution region and they are order dependent, too. @@ -233,7 +233,7 @@ private[akka] class OneBoundedInterpreter(ops: Seq[Stage[_, _]], val forkLimit: /** * Override this method to enter the current op and execute it. Do NOT put code that should be executed after the - * op has been invoked, that should be in the advance() method of the next state resulting from the invokation of + * op has been invoked, that should be in the advance() method of the next state resulting from the invocation of * the op. */ def run(): Unit diff --git a/akka-stream/src/main/scala/akka/stream/scaladsl/Flow.scala b/akka-stream/src/main/scala/akka/stream/scaladsl/Flow.scala index c11b587595..10938992d1 100644 --- a/akka-stream/src/main/scala/akka/stream/scaladsl/Flow.scala +++ b/akka-stream/src/main/scala/akka/stream/scaladsl/Flow.scala @@ -233,7 +233,7 @@ final class Flow[-In, +Out, +Mat](private[stream] override val module: Module) /** INTERNAL API */ override private[stream] def andThen[U](op: StageModule): Repr[U, Mat] = { - //No need to copy here, op is a fresh instanc + //No need to copy here, op is a fresh instance if (this.isIdentity) new Flow(op).asInstanceOf[Repr[U, Mat]] else new Flow(module.growConnect(op, shape.outlet, op.inPort).replaceShape(FlowShape(shape.inlet, op.outPort))) } diff --git a/akka-stream/src/main/scala/akka/stream/scaladsl/Graph.scala b/akka-stream/src/main/scala/akka/stream/scaladsl/Graph.scala index 128a9acf66..40798515cf 100644 --- a/akka-stream/src/main/scala/akka/stream/scaladsl/Graph.scala +++ b/akka-stream/src/main/scala/akka/stream/scaladsl/Graph.scala @@ -193,7 +193,7 @@ object FlowGraph extends GraphApply { * connected. */ def add[S <: Shape](graph: Graph[S, _]): S = { - if (StreamLayout.debug) graph.module.validate() + if (StreamLayout.Debug) graph.module.validate() val copy = graph.module.carbonCopy moduleInProgress = moduleInProgress.grow(copy) graph.shape.copyFromPorts(copy.shape.inlets, copy.shape.outlets).asInstanceOf[S] @@ -206,7 +206,7 @@ object FlowGraph extends GraphApply { * Flow, Sink and Graph. */ private[stream] def add[S <: Shape, A, B](graph: Graph[S, _], combine: (A, B) ⇒ Any): S = { - if (StreamLayout.debug) graph.module.validate() + if (StreamLayout.Debug) graph.module.validate() val copy = graph.module.carbonCopy moduleInProgress = moduleInProgress.grow(copy, combine) graph.shape.copyFromPorts(copy.shape.inlets, copy.shape.outlets).asInstanceOf[S] diff --git a/akka-stream/src/main/scala/akka/stream/stage/Stage.scala b/akka-stream/src/main/scala/akka/stream/stage/Stage.scala index 1f9d714b82..5bcca2f1d5 100644 --- a/akka-stream/src/main/scala/akka/stream/stage/Stage.scala +++ b/akka-stream/src/main/scala/akka/stream/stage/Stage.scala @@ -19,7 +19,7 @@ import akka.stream.Supervision * * It is possible to keep state in the concrete `Stage` instance with * ordinary instance variables. The `Transformer` is executed by an actor and - * therefore you don not have to add any additional thread safety or memory + * therefore you do not have to add any additional thread safety or memory * visibility constructs to access the state from the callback methods. * * @see [[akka.stream.scaladsl.Flow#transform]] @@ -205,7 +205,7 @@ abstract class DetachedStage[In, Out] extends AbstractStage[In, Out, UpstreamDir /** * The behavior of [[StatefulStage]] is defined by these two methods, which - * has the same sematics as corresponding methods in [[PushPullStage]]. + * has the same semantics as corresponding methods in [[PushPullStage]]. */ abstract class StageState[In, Out] { def onPush(elem: In, ctx: Context[Out]): Directive