activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r758802 - in /activemq/activemq-cpp/trunk/src/main: activemq/transport/failover/URIPool.cpp decaf/util/StlList.h
Date Thu, 26 Mar 2009 19:14:48 GMT
Author: tabish
Date: Thu Mar 26 19:14:48 2009
New Revision: 758802

URL: http://svn.apache.org/viewvc?rev=758802&view=rev
Log:
Fix some issues on Windows with the latest changes in trunk.

Modified:
    activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/URIPool.cpp
    activemq/activemq-cpp/trunk/src/main/decaf/util/StlList.h

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/URIPool.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/URIPool.cpp?rev=758802&r1=758801&r2=758802&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/URIPool.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/failover/URIPool.cpp Thu Mar 26
19:14:48 2009
@@ -47,22 +47,23 @@
 URI URIPool::getURI() throw ( decaf::lang::exceptions::NoSuchElementException ) {
 
     synchronized( &uriPool ) {
-        if( uriPool.isEmpty() ) {
-            throw NoSuchElementException(
-                __FILE__, __LINE__, "URI Pool is currently empty." );
-        }
+        if( !uriPool.isEmpty() ) {
 
-        int index = 0;  // Take the first one in the list unless random is on.
+			int index = 0;  // Take the first one in the list unless random is on.
 
-        if( isRandomize() ) {
+			if( isRandomize() ) {
 
-            Random rand;
-            rand.setSeed( decaf::lang::System::currentTimeMillis() );
-            index = rand.nextInt( (int)uriPool.size() );
-        }
+				Random rand;
+				rand.setSeed( decaf::lang::System::currentTimeMillis() );
+				index = rand.nextInt( (int)uriPool.size() );
+			}
 
-        return uriPool.remove( index );
+			return uriPool.remove( index );
+		}
     }
+
+    throw NoSuchElementException(
+        __FILE__, __LINE__, "URI Pool is currently empty." );
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/trunk/src/main/decaf/util/StlList.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/util/StlList.h?rev=758802&r1=758801&r2=758802&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/decaf/util/StlList.h (original)
+++ activemq/activemq-cpp/trunk/src/main/decaf/util/StlList.h Thu Mar 26 19:14:48 2009
@@ -259,7 +259,7 @@
          * @param source The source set.
          */
         StlList( const Collection<E>& source ) : List<E>() {
-            copy( source );
+			List::copy( source );
         }
 
         virtual ~StlList() {}



Mime
View raw message