activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1032137 - /activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/ConfigurationResource.scala
Date Sat, 06 Nov 2010 20:54:45 GMT
Author: chirino
Date: Sat Nov  6 20:54:44 2010
New Revision: 1032137

URL: http://svn.apache.org/viewvc?rev=1032137&view=rev
Log:
dont throw NOT_FOUND results in a hawtdispatch thread.

Modified:
    activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/ConfigurationResource.scala

Modified: activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/ConfigurationResource.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/ConfigurationResource.scala?rev=1032137&r1=1032136&r2=1032137&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/ConfigurationResource.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-web/src/main/scala/org/apache/activemq/apollo/web/resources/ConfigurationResource.scala
Sat Nov  6 20:54:44 2010
@@ -34,8 +34,8 @@ case class ConfigurationResource(parent:
 
   lazy val config = {
     ConfigStore.sync{ store=>
-      store.getBroker(parent.id, false).getOrElse(result(NOT_FOUND))
-    }
+      store.getBroker(parent.id, false)
+    } .getOrElse(result(NOT_FOUND))
   }
 
 
@@ -64,15 +64,15 @@ case class ConfigurationResource(parent:
     config.id = parent.id;
     config.rev = rev
     ConfigStore.sync { store=>
-      store.putBroker(config) || result(NOT_FOUND)
-    }
+      store.putBroker(config)
+    } || result(NOT_FOUND)
   }
 
   @DELETE @Path("{rev}")
   def delete(@PathParam("rev") rev:Int) = {
     ConfigStore.sync { store=>
-      store.removeBroker(parent.id, rev) || result(NOT_FOUND)
-    }
+      store.removeBroker(parent.id, rev)
+    } || result(NOT_FOUND)
   }
 
 }



Mime
View raw message