Skip to content
Browse files

Some small code cleanup

git-svn-id: https://svn.apache.org/repos/asf/activemq/activemq-cpp/trunk@1420499 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 75f2552 commit 116429391a26f7a387f96b2295fa2ec7ef1308e3 Timothy A. Bish committed
View
23 activemq-cpp/src/main/activemq/transport/AbstractTransportFactory.cpp
@@ -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)
}
View
19 activemq-cpp/src/main/activemq/transport/IOTransport.cpp
@@ -71,6 +71,7 @@ void IOTransport::fire(decaf::lang::Exception& ex) {
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<Command> command) {
}
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)
}
////////////////////////////////////////////////////////////////////////////////
View
6 activemq-cpp/src/main/activemq/transport/TransportFilter.cpp
@@ -130,9 +130,9 @@ void TransportFilter::reconnect(const decaf::net::URI& uri) {
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)
}
////////////////////////////////////////////////////////////////////////////////

0 comments on commit 1164293

Please sign in to comment.
Something went wrong with that request. Please try again.