activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1102504 - in /activemq/activemq-apollo/trunk: apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/ apollo-broker/src/test/scala/org/apache/activemq/apollo/broker/perf/ apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/com...
Date Thu, 12 May 2011 23:11:01 GMT
Author: chirino
Date: Thu May 12 23:11:00 2011
New Revision: 1102504

URL: http://svn.apache.org/viewvc?rev=1102504&view=rev
Log:
Resolve deprecation warnings due to scala 2.9.0 upgrade.

Modified:
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.scala
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/LocalRouter.scala
    activemq/activemq-apollo/trunk/apollo-broker/src/test/scala/org/apache/activemq/apollo/broker/perf/BasicScenarios.scala
    activemq/activemq-apollo/trunk/apollo-broker/src/test/scala/org/apache/activemq/apollo/broker/perf/DeepQueueScenarios.scala
    activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Run.scala
    activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/StoreExport.scala
    activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/StoreImport.scala
    activemq/activemq-apollo/trunk/apollo-jdbm2/src/main/scala/org/apache/activemq/apollo/broker/store/jdbm2/JDBM2Client.scala
    activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/ClassFinder.scala
    activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/FileSupport.scala
    activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/OptionSupport.scala

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.scala?rev=1102504&r1=1102503&r2=1102504&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Broker.scala
Thu May 12 23:11:00 2011
@@ -33,7 +33,6 @@ import collection.mutable.{HashSet, Link
 import scala.util.Random
 import FileSupport._
 import org.apache.activemq.apollo.dto.{LogCategoryDTO, BrokerDTO}
-import org.apache.activemq.apollo.broker.AcceptingConnector
 
 /**
  * <p>

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/LocalRouter.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/LocalRouter.scala?rev=1102504&r1=1102503&r2=1102504&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/LocalRouter.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/LocalRouter.scala
Thu May 12 23:11:00 2011
@@ -121,11 +121,11 @@ class LocalRouter(val virtual_host:Virtu
     val consumers_by_path = new PathMap[ConsumerContext]()
     val producers_by_path = new PathMap[ProducerContext]()
 
-    def destinations:Iterable[D] = JavaConversions.asScalaIterable(destination_by_path.get(ALL))
+    def destinations:Iterable[D] = JavaConversions.collectionAsScalaIterable(destination_by_path.get(ALL))
 
     def get_destination_matches(path:Path) = {
       import JavaConversions._
-      asScalaIterable(destination_by_path.get( path ))
+      collectionAsScalaIterable(destination_by_path.get( path ))
     }
 
     def create_destination(path:Path, destination:DestinationDTO, security:SecurityContext):Result[D,String]

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/test/scala/org/apache/activemq/apollo/broker/perf/BasicScenarios.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/test/scala/org/apache/activemq/apollo/broker/perf/BasicScenarios.scala?rev=1102504&r1=1102503&r2=1102504&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/test/scala/org/apache/activemq/apollo/broker/perf/BasicScenarios.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/test/scala/org/apache/activemq/apollo/broker/perf/BasicScenarios.scala
Thu May 12 23:11:00 2011
@@ -70,7 +70,7 @@ trait BasicScenarios extends BrokerPerfS
        * benchmark( increasing partitioned load.
        */
       for( count <- partitionedLoad ) {
-        benchmark(format("%s%d->%d->%d%s", prefix, count, count, count, suffix)) {
+        benchmark("%s%d->%d->%d%s".format(prefix, count, count, count, suffix)) {
           println(testName)
           producerCount = count;
           destCount = count;
@@ -92,7 +92,7 @@ trait BasicScenarios extends BrokerPerfS
        * destination.
        */
       for( (producers, consumers) <- List((highContention, 1), (1, highContention), (highContention,
highContention)) ) {
-        benchmark(format("%s%d->1->%d%s", prefix, producers, consumers, suffix)) {
+        benchmark("%s%d->1->%d%s".format(prefix, producers, consumers, suffix)) {
           producerCount = producers;
           consumerCount = consumers;
           destCount = 1;

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/test/scala/org/apache/activemq/apollo/broker/perf/DeepQueueScenarios.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/test/scala/org/apache/activemq/apollo/broker/perf/DeepQueueScenarios.scala?rev=1102504&r1=1102503&r2=1102504&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/test/scala/org/apache/activemq/apollo/broker/perf/DeepQueueScenarios.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/test/scala/org/apache/activemq/apollo/broker/perf/DeepQueueScenarios.scala
Thu May 12 23:11:00 2011
@@ -43,7 +43,7 @@ trait DeepQueueScenarios extends Persist
     val prefix = "queue " + (if ((messageSize % 1024) == 0) (messageSize / 1024) + "k" else
messageSize + "b") + " "
     val suffix = "" //(if( durable ) " durable" else "")
 
-    benchmark(format("%s%d%s", prefix, count, suffix)) {
+    benchmark("%s%d%s".format(prefix, count, suffix)) {
       producerCount = count;
       createConnections();
 

Modified: activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Run.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Run.scala?rev=1102504&r1=1102503&r2=1102504&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Run.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/Run.scala
Thu May 12 23:11:00 2011
@@ -40,11 +40,11 @@ class Run extends Action {
   def system_dir(name:String) = {
     val base_value = System.getProperty(name)
     if( base_value==null ) {
-      error("The the %s system property is not set.".format(name))
+      sys.error("The the %s system property is not set.".format(name))
     }
     val file = new File(base_value)
     if( !file.isDirectory  ) {
-      error("The the %s system property is not set to valid directory path %s".format(name,
base_value))
+      sys.error("The the %s system property is not set to valid directory path %s".format(name,
base_value))
     }
     file
   }
@@ -60,7 +60,7 @@ class Run extends Action {
       }
 
       if( !conf.exists ) {
-        error("Configuration file'%s' does not exist.\n\nTry creating a broker instance using
the 'apollo create' command.".format(conf));
+        sys.error("Configuration file'%s' does not exist.\n\nTry creating a broker instance
using the 'apollo create' command.".format(conf));
       }
 
       if( System.getProperty("java.security.auth.login.config")==null ) {
@@ -103,7 +103,7 @@ class Run extends Action {
 
     } catch {
       case x:Helper.Failure=>
-        error(x.getMessage)
+        sys.error(x.getMessage)
     }
     null
   }

Modified: activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/StoreExport.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/StoreExport.scala?rev=1102504&r1=1102503&r2=1102504&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/StoreExport.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/StoreExport.scala
Thu May 12 23:11:00 2011
@@ -61,7 +61,7 @@ class StoreExport extends Action {
 
       val config = new FileConfigStore(conf).load(true)
 
-      val hosts = collection.JavaConversions.asScalaIterable(config.virtual_hosts).toArray
+      val hosts = collection.JavaConversions.collectionAsScalaIterable(config.virtual_hosts).toArray
       val vho:Option[VirtualHostDTO] = if( host==null ) {
         hosts.headOption
       } else {

Modified: activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/StoreImport.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/StoreImport.scala?rev=1102504&r1=1102503&r2=1102504&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/StoreImport.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-cli/src/main/scala/org/apache/activemq/apollo/cli/commands/StoreImport.scala
Thu May 12 23:11:00 2011
@@ -62,7 +62,7 @@ class StoreImport extends Action {
 
       val config = new FileConfigStore(conf).load(true)
 
-      val hosts = collection.JavaConversions.asScalaIterable(config.virtual_hosts).toArray
+      val hosts = collection.JavaConversions.collectionAsScalaIterable(config.virtual_hosts).toArray
       val vho:Option[VirtualHostDTO] = if( host==null ) {
         hosts.headOption
       } else {

Modified: activemq/activemq-apollo/trunk/apollo-jdbm2/src/main/scala/org/apache/activemq/apollo/broker/store/jdbm2/JDBM2Client.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-jdbm2/src/main/scala/org/apache/activemq/apollo/broker/store/jdbm2/JDBM2Client.scala?rev=1102504&r1=1102503&r2=1102504&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-jdbm2/src/main/scala/org/apache/activemq/apollo/broker/store/jdbm2/JDBM2Client.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-jdbm2/src/main/scala/org/apache/activemq/apollo/broker/store/jdbm2/JDBM2Client.scala
Thu May 12 23:11:00 2011
@@ -104,7 +104,7 @@ object JDBM2Client extends Log {
 
   }
 
-  implicit def to_rich_btree[K,V](x: BTree[K,V]) = new RichBTree[K,V](x)
+  implicit def btree_to_rich_btree[K,V](x: BTree[K,V]) = new RichBTree[K,V](x)
 
   final class RichHTree[K,V](val self: HTree[K,V]) {
 
@@ -120,7 +120,7 @@ object JDBM2Client extends Log {
 
   }
 
-  implicit def to_rich_btree[K,V](x: HTree[K,V]) = new RichHTree[K,V](x)
+  implicit def htree_to_rich_btree[K,V](x: HTree[K,V]) = new RichHTree[K,V](x)
 
 }
 

Modified: activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/ClassFinder.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/ClassFinder.scala?rev=1102504&r1=1102503&r2=1102504&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/ClassFinder.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/ClassFinder.scala
Thu May 12 23:11:00 2011
@@ -122,7 +122,7 @@ class ClassFinder[T](val path:String, va
 
   def jsingletons = {
     import collection.JavaConversions._
-    asJavaList(singletons)
+    seqAsJavaList(singletons)
   }
 
 }
\ No newline at end of file

Modified: activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/FileSupport.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/FileSupport.scala?rev=1102504&r1=1102503&r2=1102504&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/FileSupport.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/FileSupport.scala
Thu May 12 23:11:00 2011
@@ -27,11 +27,11 @@ object FileSupport {
   def system_dir(name:String) = {
     val base_value = System.getProperty(name)
     if( base_value==null ) {
-      error("The the %s system property is not set.".format(name))
+      sys.error("The the %s system property is not set.".format(name))
     }
     val file = new File(base_value)
     if( !file.isDirectory  ) {
-      error("The the %s system property is not set to valid directory path %s".format(name,
base_value))
+      sys.error("The the %s system property is not set to valid directory path %s".format(name,
base_value))
     }
     file
   }

Modified: activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/OptionSupport.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/OptionSupport.scala?rev=1102504&r1=1102503&r2=1102504&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/OptionSupport.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/OptionSupport.scala
Thu May 12 23:11:00 2011
@@ -25,42 +25,42 @@ import java.{lang=>jl}
  */
 object OptionSupport {
 
-  implicit def o(value:jl.Boolean):Option[Boolean] = value match {
+  implicit def boxed_boolean_to_option(value:jl.Boolean):Option[Boolean] = value match {
     case null => None
     case x => Some(x.booleanValue)
   }
 
-  implicit def o(value:jl.Character):Option[Char] = value match {
+  implicit def boxed_character_to_option(value:jl.Character):Option[Char] = value match {
     case null => None
     case x => Some(x.charValue)
   }
 
-  implicit def o(value:jl.Short):Option[Short] = value match {
+  implicit def boxed_short_to_option(value:jl.Short):Option[Short] = value match {
     case null => None
     case x => Some(x.shortValue)
   }
 
-  implicit def o(value:jl.Integer):Option[Int] = value match {
+  implicit def boxed_integer_to_option(value:jl.Integer):Option[Int] = value match {
     case null => None
     case x => Some(x.intValue)
   }
 
-  implicit def o(value:jl.Long):Option[Long] = value match {
+  implicit def boxed_long_to_option(value:jl.Long):Option[Long] = value match {
     case null => None
     case x => Some(x.longValue)
   }
 
-  implicit def o(value:jl.Double):Option[Double] = value match {
+  implicit def boxed_double_to_option(value:jl.Double):Option[Double] = value match {
     case null => None
     case x => Some(x.doubleValue)
   }
 
-  implicit def o(value:jl.Float):Option[Float] = value match {
+  implicit def boxed_float_to_option(value:jl.Float):Option[Float] = value match {
     case null => None
     case x => Some(x.floatValue)
   }
 
-  implicit def o[T](value:T):Option[T] = value match {
+  implicit def any_to_option[T](value:T):Option[T] = value match {
     case null => None
     case x => Some(x)
   }



Mime
View raw message