activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1420499 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport: AbstractTransportFactory.cpp IOTransport.cpp TransportFilter.cpp
Date Wed, 12 Dec 2012 00:30:46 GMT
Author: tabish
Date: Wed Dec 12 00:30:44 2012
New Revision: 1420499

URL: http://svn.apache.org/viewvc?rev=1420499&view=rev
Log:
Some small code cleanup

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/AbstractTransportFactory.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/IOTransport.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/TransportFilter.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/AbstractTransportFactory.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/AbstractTransportFactory.cpp?rev=1420499&r1=1420498&r2=1420499&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/AbstractTransportFactory.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/AbstractTransportFactory.cpp
Wed Dec 12 00:30:44 2012
@@ -38,23 +38,16 @@ using namespace decaf::util;
 
 ////////////////////////////////////////////////////////////////////////////////
 AbstractTransportFactory::~AbstractTransportFactory() {
-
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-Pointer<WireFormat> AbstractTransportFactory::createWireFormat(
-    const decaf::util::Properties& properties ) {
-
-    try{
-
-        std::string wireFormat = properties.getProperty( "wireFormat", "openwire" );
-
-        WireFormatFactory* factory =
-            WireFormatRegistry::getInstance().findFactory( wireFormat );
-
-        return factory->createWireFormat( properties );
+Pointer<WireFormat> AbstractTransportFactory::createWireFormat(const decaf::util::Properties&
properties) {
+    try {
+        std::string wireFormat = properties.getProperty("wireFormat", "openwire");
+        WireFormatFactory* factory = WireFormatRegistry::getInstance().findFactory(wireFormat);
+        return factory->createWireFormat(properties);
     }
-    AMQ_CATCH_RETHROW( NoSuchElementException )
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, NoSuchElementException )
-    AMQ_CATCHALL_THROW( NoSuchElementException )
+    AMQ_CATCH_RETHROW(NoSuchElementException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, NoSuchElementException)
+    AMQ_CATCHALL_THROW(NoSuchElementException)
 }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/IOTransport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/IOTransport.cpp?rev=1420499&r1=1420498&r2=1420499&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/IOTransport.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/IOTransport.cpp Wed
Dec 12 00:30:44 2012
@@ -71,6 +71,7 @@ void IOTransport::fire(decaf::lang::Exce
 void IOTransport::fire(const Pointer<Command> command) {
 
     try {
+
         // If we have been closed then we don't deliver any messages that
         // might have sneaked in while we where closing.
         if (this->listener == NULL || this->closed == true) {
@@ -78,7 +79,6 @@ void IOTransport::fire(const Pointer<Com
         }
 
         this->listener->onCommand(command);
-
     }
     AMQ_CATCHALL_NOTHROW()
 }
@@ -153,9 +153,9 @@ void IOTransport::stop() {
 
     try {
     }
-    AMQ_CATCH_RETHROW( IOException)
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException)
-    AMQ_CATCHALL_THROW( IOException)
+    AMQ_CATCH_RETHROW(IOException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, IOException)
+    AMQ_CATCHALL_THROW(IOException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -168,9 +168,8 @@ void IOTransport::close() {
 
     public:
 
-        Finalizer(Pointer<Thread> target) :
-                target(target) {
-        }
+        Finalizer(Pointer<Thread> target) : target(target) {}
+
         ~Finalizer() {
             try {
                 target->join();
@@ -232,9 +231,9 @@ void IOTransport::close() {
             throw error;
         }
     }
-    AMQ_CATCH_RETHROW( IOException)
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException)
-    AMQ_CATCHALL_THROW( IOException)
+    AMQ_CATCH_RETHROW(IOException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, IOException)
+    AMQ_CATCHALL_THROW(IOException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/TransportFilter.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/TransportFilter.cpp?rev=1420499&r1=1420498&r2=1420499&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/TransportFilter.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/TransportFilter.cpp
Wed Dec 12 00:30:44 2012
@@ -130,9 +130,9 @@ void TransportFilter::reconnect(const de
     try {
         next->reconnect(uri);
     }
-    AMQ_CATCH_RETHROW( IOException)
-    AMQ_CATCH_EXCEPTION_CONVERT( Exception, IOException)
-    AMQ_CATCHALL_THROW( IOException)
+    AMQ_CATCH_RETHROW(IOException)
+    AMQ_CATCH_EXCEPTION_CONVERT(Exception, IOException)
+    AMQ_CATCHALL_THROW(IOException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////



Mime
View raw message