activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1051695 - in /activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker: Router.scala jaxb/XmlBrokerFactory.scala
Date Tue, 21 Dec 2010 23:21:59 GMT
Author: chirino
Date: Tue Dec 21 23:21:58 2010
New Revision: 1051695

URL: http://svn.apache.org/viewvc?rev=1051695&view=rev
Log:
Eliminate some warnings.

Modified:
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Router.scala
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jaxb/XmlBrokerFactory.scala

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Router.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Router.scala?rev=1051695&r1=1051694&r2=1051695&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Router.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Router.scala
Tue Dec 21 23:21:58 2010
@@ -93,7 +93,7 @@ class Router(val host:VirtualHost) exten
     rc
   })
 
-  def routing_nodes:Iterable[RoutingNode] = JavaConversions.asIterable(destinations.get(ALL))
+  def routing_nodes:Iterable[RoutingNode] = JavaConversions.asScalaIterable(destinations.get(ALL))
   
   def _get_or_create_destination(path:Path, security:SecurityContext) = {
     // We can't create a wild card destination.. only wild card subscriptions.
@@ -138,7 +138,7 @@ class Router(val host:VirtualHost) exten
 
   def get_destination_matches(path:Path) = {
     import JavaConversions._
-    asIterable(destinations.get( path ))
+    asScalaIterable(destinations.get( path ))
   }
 
   def _create_queue(id:Long, binding:Binding, security:SecurityContext):Result[Queue,String]
= {

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jaxb/XmlBrokerFactory.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jaxb/XmlBrokerFactory.scala?rev=1051695&r1=1051694&r2=1051695&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jaxb/XmlBrokerFactory.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/jaxb/XmlBrokerFactory.scala
Tue Dec 21 23:21:58 2010
@@ -58,16 +58,18 @@ class XmlBrokerFactory extends BrokerFac
     import ReporterLevel._
     val broker = new Broker()
 
-    var errorMessage = "";
-    if( broker.configure(config, new Reporter(){
+    var error_message = "";
+    broker.configure(config, new Reporter(){
       override def report(level: ReporterLevel, message: String) = {
         level match {
-          case ERROR=> errorMessage+=message+"\n"
+          case ERROR=> error_message+=message+"\n"
           case _=>
         }
       }
-    }) == ERROR ) {
-      throw new Exception("Invalid Broker Configuration:\n"+ERROR)
+    })
+
+    if( !error_message.isEmpty ) {
+      throw new Exception("Invalid Broker Configuration:\n"+error_message)
     }
     
     broker



Mime
View raw message