Skip to content

Commit 56e7428

Browse files
author
Jonas Bonér
committed
Removed trailing whitespace
1 parent c873256 commit 56e7428

File tree

34 files changed

+273
-273
lines changed

34 files changed

+273
-273
lines changed

akka-core/src/main/scala/actor/ActiveObject.scala

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -66,23 +66,23 @@ final class ActiveObjectConfiguration {
6666
}
6767

6868
/**
69-
* Holds RTTI (runtime type information) for the Active Object, f.e. current 'sender'
69+
* Holds RTTI (runtime type information) for the Active Object, f.e. current 'sender'
7070
* reference, the 'senderFuture' reference etc.
7171
* <p/>
72-
* In order to make use of this context you have to create a member field in your
73-
* Active Object that has the type 'ActiveObjectContext', then an instance will
74-
* be injected for you to use.
72+
* In order to make use of this context you have to create a member field in your
73+
* Active Object that has the type 'ActiveObjectContext', then an instance will
74+
* be injected for you to use.
7575
* <p/>
76-
* This class does not contain static information but is updated by the runtime system
77-
* at runtime.
76+
* This class does not contain static information but is updated by the runtime system
77+
* at runtime.
7878
* <p/>
79-
* Here is an example of usage:
79+
* Here is an example of usage:
8080
* <pre>
8181
* class Ping {
82-
* // This context will be injected, holds RTTI (runtime type information)
83-
* // for the current message send
82+
* // This context will be injected, holds RTTI (runtime type information)
83+
* // for the current message send
8484
* private ActiveObjectContext context = null;
85-
*
85+
*
8686
* public void hit(int count) {
8787
* Pong pong = (Pong) context.getSender();
8888
* pong.hit(count++)
@@ -100,19 +100,19 @@ final class ActiveObjectContext {
100100
* Returns the current sender Active Object reference.
101101
* Scala style getter.
102102
*/
103-
def sender: AnyRef = {
103+
def sender: AnyRef = {
104104
if (_sender eq null) throw new IllegalStateException("Sender reference should not be null.")
105105
else _sender
106-
}
106+
}
107107

108108
/**
109109
* Returns the current sender Active Object reference.
110110
* Java style getter.
111111
*/
112-
def getSender: AnyRef = {
112+
def getSender: AnyRef = {
113113
if (_sender eq null) throw new IllegalStateException("Sender reference should not be null.")
114114
else _sender
115-
}
115+
}
116116

117117
/**
118118
* Returns the current sender future Active Object reference.
@@ -364,7 +364,7 @@ object ActiveObject extends Logging {
364364
proxy.asInstanceOf[T]
365365
}
366366

367-
private[akka] def newInstance[T](intf: Class[T], target: AnyRef, actorRef: ActorRef,
367+
private[akka] def newInstance[T](intf: Class[T], target: AnyRef, actorRef: ActorRef,
368368
remoteAddress: Option[InetSocketAddress], timeout: Long): T = {
369369
val context = injectActiveObjectContext(target)
370370
val proxy = Proxy.newInstance(Array(intf), Array(target), false, false)
@@ -462,7 +462,7 @@ object ActiveObject extends Logging {
462462
if (parent != null) injectActiveObjectContext0(activeObject, parent)
463463
else {
464464
log.warning(
465-
"Can't set 'ActiveObjectContext' for ActiveObject [%s] since no field of this type could be found.",
465+
"Can't set 'ActiveObjectContext' for ActiveObject [%s] since no field of this type could be found.",
466466
activeObject.getClass.getName)
467467
None
468468
}
@@ -522,7 +522,7 @@ private[akka] sealed class ActiveObjectAspect {
522522
remoteAddress = init.remoteAddress
523523
timeout = init.timeout
524524
isInitialized = true
525-
525+
526526
}
527527
dispatch(joinPoint)
528528
}
@@ -583,7 +583,7 @@ private[akka] sealed class ActiveObjectAspect {
583583
} else future.result
584584

585585
private def isVoid(rtti: MethodRtti) = rtti.getMethod.getReturnType == java.lang.Void.TYPE
586-
586+
587587
private def escapeArguments(args: Array[AnyRef]): Tuple2[Array[AnyRef], Boolean] = {
588588
var isEscaped = false
589589
val escapedArgs = for (arg <- args) yield {
@@ -606,11 +606,11 @@ private[akka] sealed class ActiveObjectAspect {
606606
joinPoint: JoinPoint, isOneWay: Boolean, isVoid: Boolean, sender: AnyRef, senderFuture: CompletableFuture[Any]) {
607607

608608
override def toString: String = synchronized {
609-
"Invocation [joinPoint: " + joinPoint.toString +
610-
", isOneWay: " + isOneWay +
609+
"Invocation [joinPoint: " + joinPoint.toString +
610+
", isOneWay: " + isOneWay +
611611
", isVoid: " + isVoid +
612-
", sender: " + sender +
613-
", senderFuture: " + senderFuture +
612+
", sender: " + sender +
613+
", senderFuture: " + senderFuture +
614614
"]"
615615
}
616616

@@ -653,11 +653,11 @@ private[akka] class Dispatcher(transactionalRequired: Boolean, val callbacks: Op
653653
private var postRestart: Option[Method] = None
654654
private var initTxState: Option[Method] = None
655655
private var context: Option[ActiveObjectContext] = None
656-
656+
657657
def this(transactionalRequired: Boolean) = this(transactionalRequired,None)
658658

659659
private[actor] def initialize(targetClass: Class[_], targetInstance: AnyRef, ctx: Option[ActiveObjectContext]) = {
660-
if (transactionalRequired || targetClass.isAnnotationPresent(Annotations.transactionrequired))
660+
if (transactionalRequired || targetClass.isAnnotationPresent(Annotations.transactionrequired))
661661
self.makeTransactionRequired
662662
self.id = targetClass.getName
663663
target = Some(targetInstance)
@@ -705,7 +705,7 @@ private[akka] class Dispatcher(transactionalRequired: Boolean, val callbacks: Op
705705

706706
def receive = {
707707
case Invocation(joinPoint, isOneWay, _, sender, senderFuture) =>
708-
context.foreach { ctx =>
708+
context.foreach { ctx =>
709709
if (sender ne null) ctx._sender = sender
710710
if (senderFuture ne null) ctx._senderFuture = senderFuture
711711
}

akka-core/src/main/scala/actor/Actor.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ trait Actor extends Logging {
329329
* <pre>
330330
* self ! message
331331
* </pre>
332-
* Here you also find most of the Actor API.
332+
* Here you also find most of the Actor API.
333333
* <p/>
334334
* For example fields like:
335335
* <pre>
@@ -384,7 +384,7 @@ trait Actor extends Logging {
384384
* Is called when an Actor is started by invoking 'actor.start'.
385385
*/
386386
def init {}
387-
387+
388388
/**
389389
* User overridable callback.
390390
* <p/>

akka-core/src/main/scala/actor/ActorRef.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ trait ActorRef extends TransactionManagement {
222222
* Is defined if the message was sent with sent with '!!' or '!!!', else None.
223223
*/
224224
def senderFuture: Option[CompletableFuture[Any]] = guard.withGuard { _senderFuture }
225-
225+
226226
/**
227227
* Is the actor being restarted?
228228
*/
@@ -356,7 +356,7 @@ trait ActorRef extends TransactionManagement {
356356
"\n\tYou have probably: " +
357357
"\n\t\t1. Sent a message to an Actor from an instance that is NOT an Actor." +
358358
"\n\t\t2. Invoked a method on an Active Object from an instance NOT an Active Object.")
359-
359+
360360
/**
361361
* Use <code>reply_?(..)</code> to reply with a message to the original sender of the message currently
362362
* being processed.
@@ -1224,7 +1224,7 @@ private[akka] case class RemoteActorRef private[akka] (
12241224
extends ActorRef {
12251225
_uuid = uuuid
12261226
timeout = _timeout
1227-
1227+
12281228
start
12291229
lazy val remoteClient = RemoteClient.clientFor(hostname, port, loader)
12301230

akka-core/src/main/scala/remote/RemoteClient.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,19 +82,19 @@ object RemoteClient extends Logging {
8282
private[akka] def actorFor(uuid: String, className: String, timeout: Long, hostname: String, port: Int, loader: Option[ClassLoader]): ActorRef =
8383
RemoteActorRef(uuid, className, hostname, port, timeout, loader)
8484

85-
def clientFor(hostname: String, port: Int): RemoteClient =
85+
def clientFor(hostname: String, port: Int): RemoteClient =
8686
clientFor(new InetSocketAddress(hostname, port), None)
8787

88-
def clientFor(hostname: String, port: Int, loader: ClassLoader): RemoteClient =
88+
def clientFor(hostname: String, port: Int, loader: ClassLoader): RemoteClient =
8989
clientFor(new InetSocketAddress(hostname, port), Some(loader))
9090

91-
def clientFor(address: InetSocketAddress): RemoteClient =
91+
def clientFor(address: InetSocketAddress): RemoteClient =
9292
clientFor(address, None)
9393

94-
def clientFor(address: InetSocketAddress, loader: ClassLoader): RemoteClient =
94+
def clientFor(address: InetSocketAddress, loader: ClassLoader): RemoteClient =
9595
clientFor(address, Some(loader))
9696

97-
private[akka] def clientFor(hostname: String, port: Int, loader: Option[ClassLoader]): RemoteClient =
97+
private[akka] def clientFor(hostname: String, port: Int, loader: Option[ClassLoader]): RemoteClient =
9898
clientFor(new InetSocketAddress(hostname, port), loader)
9999

100100
private[akka] def clientFor(address: InetSocketAddress, loader: Option[ClassLoader]): RemoteClient = synchronized {
@@ -330,7 +330,7 @@ class RemoteClientHandler(val name: String,
330330
client.connection = bootstrap.connect(remoteAddress)
331331
client.connection.awaitUninterruptibly // Wait until the connection attempt succeeds or fails.
332332
if (!client.connection.isSuccess) {
333-
client.listeners.toArray.foreach(l =>
333+
client.listeners.toArray.foreach(l =>
334334
l.asInstanceOf[ActorRef] ! RemoteClientError(client.connection.getCause))
335335
log.error(client.connection.getCause, "Reconnection to [%s] has failed", remoteAddress)
336336
}
@@ -339,13 +339,13 @@ class RemoteClientHandler(val name: String,
339339
}
340340

341341
override def channelConnected(ctx: ChannelHandlerContext, event: ChannelStateEvent) = {
342-
client.listeners.toArray.foreach(l =>
342+
client.listeners.toArray.foreach(l =>
343343
l.asInstanceOf[ActorRef] ! RemoteClientConnected(client.hostname, client.port))
344344
log.debug("Remote client connected to [%s]", ctx.getChannel.getRemoteAddress)
345345
}
346346

347347
override def channelDisconnected(ctx: ChannelHandlerContext, event: ChannelStateEvent) = {
348-
client.listeners.toArray.foreach(l =>
348+
client.listeners.toArray.foreach(l =>
349349
l.asInstanceOf[ActorRef] ! RemoteClientDisconnected(client.hostname, client.port))
350350
log.debug("Remote client disconnected from [%s]", ctx.getChannel.getRemoteAddress)
351351
}

akka-core/src/main/scala/remote/RemoteServer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ class RemoteServer extends Logging {
184184
def start(_hostname: String, _port: Int): RemoteServer =
185185
start(_hostname, _port, None)
186186

187-
private def start(_hostname: String, _port: Int, loader: ClassLoader): RemoteServer =
187+
private def start(_hostname: String, _port: Int, loader: ClassLoader): RemoteServer =
188188
start(_hostname, _port, Some(loader))
189189

190190
private def start(_hostname: String, _port: Int, loader: Option[ClassLoader]): RemoteServer = synchronized {

akka-core/src/main/scala/routing/Listeners.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ case class Listen(listener: ActorRef) extends ListenerMessage
1313
case class Deafen(listener: ActorRef) extends ListenerMessage
1414
case class WithListeners(f: List[ActorRef] => Unit) extends ListenerMessage
1515

16-
/**
16+
/**
1717
* Listeners is a generic trait to implement listening capability on an Actor.
1818
* <p/>
1919
* Use the <code>gossip(msg)</code> method to have it sent to the listeners.
@@ -34,6 +34,6 @@ trait Listeners { self: Actor =>
3434
}
3535

3636
protected def gossip(msg: Any) = listenersAsList foreach (_ ! msg)
37-
37+
3838
private def listenersAsList: List[ActorRef] = listeners.toArray.toList.asInstanceOf[List[ActorRef]]
3939
}

akka-core/src/main/scala/stm/Transaction.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,10 @@ object Transaction {
282282
setTransaction(Some(tx))
283283
mtx.registerLifecycleListener(new TransactionLifecycleListener() {
284284
def notify(mtx: MultiverseTransaction, event: TransactionLifecycleEvent) = event.name match {
285-
case "postCommit" =>
285+
case "postCommit" =>
286286
log.trace("Committing transaction [%s]", mtx)
287287
tx.commit
288-
case "postAbort" =>
288+
case "postAbort" =>
289289
log.trace("Aborting transaction [%s]", mtx)
290290
tx.abort
291291
case _ => {}

akka-core/src/test/scala/ActorPatternsTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class ActorPatternsTest extends junit.framework.TestCase with Suite with MustMat
4343
b <- (d.!![Int](testMsg2,5000))
4444
c <- (d.!![Int](testMsg3,5000))
4545
} yield a + b + c
46-
46+
4747
result.get must be(21)
4848
for(a <- List(t1,t2,d)) a.stop
4949
}

akka-core/src/test/scala/StmSpec.scala

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class StmSpec extends
9595
val size2: Int = (actor !! Size).getOrElse(fail("Could not get Vector::size"))
9696
size2 should equal(3)
9797
} catch {
98-
case e =>
98+
case e =>
9999
e.printStackTrace
100100
fail(e.toString)
101101
}
@@ -122,15 +122,15 @@ class StmSpec extends
122122
val size4: Int = (actor !! Size).getOrElse(fail("Could not get size"))
123123
size4 should equal(3)
124124
} catch {
125-
case e =>
125+
case e =>
126126
fail(e.toString)
127127
}
128128
}
129129
}
130130
/*
131131
describe("Multiverse API") {
132132
it("should blablabla") {
133-
133+
134134
import org.multiverse.api.programmatic._
135135
// import org.multiverse.api._
136136
import org.multiverse.templates._
@@ -139,13 +139,13 @@ class StmSpec extends
139139
import org.multiverse.api.{GlobalStmInstance, ThreadLocalTransaction, Transaction => MultiverseTransaction}
140140
import org.multiverse.api.lifecycle.{TransactionLifecycleListener, TransactionLifecycleEvent}
141141
import org.multiverse.commitbarriers._
142-
142+
143143
def createRef[T]: ProgrammaticReference[T] = GlobalStmInstance
144144
.getGlobalStmInstance
145145
.getProgrammaticReferenceFactoryBuilder
146146
.build
147147
.atomicCreateReference(null.asInstanceOf[T])
148-
148+
149149
val ref1 = Ref(0)//createRef[Int]
150150
val ref2 = Ref(0)//createRef[Int]
151151
@@ -185,13 +185,13 @@ class GlobalTransactionVectorTestActor extends Actor {
185185
import se.scalablesolutions.akka.stm.Transaction.Global
186186

187187
private val vector: TransactionalVector[Int] = Global.atomic { TransactionalVector(1) }
188-
188+
189189
def receive = {
190-
case Add(value) =>
190+
case Add(value) =>
191191
Global.atomic { vector + value}
192192
self.reply(Success)
193193

194-
case Size =>
194+
case Size =>
195195
val size = Global.atomic { vector.size }
196196
self.reply(size)
197197
}
@@ -200,12 +200,12 @@ class GlobalTransactionVectorTestActor extends Actor {
200200
class NestedTransactorLevelOneActor extends Actor {
201201
import GlobalTransactionVectorTestActor._
202202
private val nested = actorOf[NestedTransactorLevelTwoActor].start
203-
203+
204204
def receive = {
205-
case add @ Add(_) =>
205+
case add @ Add(_) =>
206206
self.reply((nested !! add).get)
207207

208-
case Size =>
208+
case Size =>
209209
self.reply((nested !! Size).get)
210210

211211
case "HiLevelOne" => println("HiLevelOne")
@@ -216,15 +216,15 @@ class NestedTransactorLevelOneActor extends Actor {
216216
class NestedTransactorLevelTwoActor extends Actor {
217217
import GlobalTransactionVectorTestActor._
218218
private val ref = Ref(0)
219-
219+
220220
def receive = {
221-
case Add(value) =>
221+
case Add(value) =>
222222
ref.swap(value)
223223
self.reply(Success)
224224

225-
case Size =>
225+
case Size =>
226226
self.reply(ref.getOrElse(-1))
227-
227+
228228
case "HiLevelTwo" => println("HiLevelTwo")
229229
}
230230
}

0 commit comments

Comments
 (0)