re #290: Added parens to no-parameter methods returning Unit in all subprojects.

This commit is contained in:
Heiko Seeberger 2010-07-02 22:37:26 +02:00
parent 2959ea3e07
commit 5fef4d1ac3
10 changed files with 15 additions and 15 deletions

View file

@ -86,7 +86,7 @@ trait CamelContextLifecycle extends Logging {
/**
* Initializes this lifecycle object with the a DefaultCamelContext.
*/
def init: Unit = init(new DefaultCamelContext)
def init(): Unit = init(new DefaultCamelContext)
/**
* Initializes this lifecycle object with the given CamelContext. For the passed

View file

@ -58,7 +58,7 @@ class ActorProducerTest extends JUnitSuite with BeforeAndAfterAll {
assert(exchange.getOut.getHeader("k3") === null) // headers from failure message are currently ignored
}
@Test def shouldSendMessageToActorAndTimeout: Unit = {
@Test def shouldSendMessageToActorAndTimeout(): Unit = {
val actor = actorOf[Tester3].start
val endpoint = mockEndpoint("actor:uuid:%s" format actor.uuid)
val exchange = endpoint.createExchange(ExchangePattern.InOut)

View file

@ -54,7 +54,7 @@ class ThreadBasedDispatcherSpec extends JUnitSuite {
internalTestMessagesDispatchedToHandlersAreExecutedInFIFOOrder
}
private def internalTestMessagesDispatchedToTheSameHandlerAreExecutedSequentially: Unit = {
private def internalTestMessagesDispatchedToTheSameHandlerAreExecutedSequentially(): Unit = {
val guardLock = new ReentrantLock
val handleLatch = new CountDownLatch(100)
val dispatcher = new ThreadBasedDispatcher("name", new TestMessageHandle(handleLatch))
@ -66,7 +66,7 @@ class ThreadBasedDispatcherSpec extends JUnitSuite {
assert(!threadingIssueDetected.get)
}
private def internalTestMessagesDispatchedToHandlersAreExecutedInFIFOOrder: Unit = {
private def internalTestMessagesDispatchedToHandlersAreExecutedInFIFOOrder(): Unit = {
val handleLatch = new CountDownLatch(100)
val dispatcher = new ThreadBasedDispatcher("name", new MessageInvoker {
var currentValue = -1;

View file

@ -27,7 +27,7 @@ class AkkaClusterBroadcastFilter extends Actor with ClusterBroadcastFilter {
/**
* Stops the actor
*/
def destroy: Unit = self.stop
def destroy(): Unit = self.stop
/**
* Relays all non ClusterCometBroadcast messages to the other AkkaClusterBroadcastFilters in the cluster

View file

@ -71,7 +71,7 @@ trait TransactionProtocol extends Logging {
protected val joinTransactionFuns: JList[() => Unit] = new CopyOnWriteArrayList[() => Unit]
protected val exceptionsNotToRollbackOn: JList[Class[_ <: Exception]] = new CopyOnWriteArrayList[Class[_ <: Exception]]
def joinTransaction: Unit = {
def joinTransaction(): Unit = {
val it = joinTransactionFuns.iterator
while (it.hasNext) {
val fn = it.next

View file

@ -44,7 +44,7 @@ trait EmbeddedAppServer extends Bootable with Logging {
val adapter = new ServletAdapter
adapter.setHandleStaticResources(true)
adapter.setServletInstance(new AkkaServlet {
override def init(sc : ServletConfig) : Unit = {
override def init(sc : ServletConfig): Unit = {
val cl = Thread.currentThread.getContextClassLoader
try {
Thread.currentThread.setContextClassLoader(applicationLoader.get)

View file

@ -23,13 +23,13 @@ object Kernel extends AkkaLoader {
/**
* Boots up the Kernel with default bootables
*/
def boot: Unit = boot(true,
def boot(): Unit = boot(true,
new EmbeddedAppServer with BootableActorLoaderService
with BootableRemoteActorService
with CamelService)
//For testing purposes only
def startRemoteService: Unit = bundles.foreach( _ match {
def startRemoteService(): Unit = bundles.foreach( _ match {
case x: BootableRemoteActorService => x.startRemoteService
case _ =>
})

View file

@ -168,7 +168,7 @@ object // EmbeddedCassandraService {
t.setDaemon(true)
t.start
def start: Unit = {}
def start(): Unit = {}
}
*/

View file

@ -13,10 +13,10 @@ trait Pool[T] extends java.io.Closeable {
def borrowObject: T
def returnObject(t: T): Unit
def invalidateObject(t: T): Unit
def addObject: Unit
def addObject(): Unit
def getNumIdle: Int
def getNumActive: Int
def clear: Unit
def clear(): Unit
def setFactory(factory: PoolItemFactory[T]): Unit
}
@ -40,8 +40,8 @@ trait PoolBridge[T, OP <: ObjectPool] extends Pool[T] {
override def addObject = impl.addObject
override def getNumIdle: Int = impl.getNumIdle
override def getNumActive: Int = impl.getNumActive
override def clear: Unit = impl.clear
override def close: Unit = impl.close
override def clear(): Unit = impl.clear()
override def close(): Unit = impl.close()
override def setFactory(factory: PoolItemFactory[T]) = impl.setFactory(toPoolableObjectFactory(factory))
def toPoolableObjectFactory[T](pif: PoolItemFactory[T]) = new PoolableObjectFactory {

View file

@ -183,7 +183,7 @@ trait ChatServer extends Actor {
// abstract methods to be defined somewhere else
protected def chatManagement: Receive
protected def sessionManagement: Receive
protected def shutdownSessions: Unit
protected def shutdownSessions(): Unit
override def shutdown = {
log.info("Chat server is shutting down...")