activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r902257 - in /activemq/activemq-cpp/branches/activemq-cpp-3.1.x: ./ activemq-cpp/src/main/decaf/lang/Pointer.h activemq-cpp/src/test/decaf/lang/PointerTest.cpp
Date Fri, 22 Jan 2010 20:34:01 GMT
Author: tabish
Date: Fri Jan 22 20:34:01 2010
New Revision: 902257

URL: http://svn.apache.org/viewvc?rev=902257&view=rev
Log:
Fix for http://issues.apache.org/activemq/browse/AMQCPP-281

Modified:
    activemq/activemq-cpp/branches/activemq-cpp-3.1.x/   (props changed)
    activemq/activemq-cpp/branches/activemq-cpp-3.1.x/activemq-cpp/src/main/decaf/lang/Pointer.h
    activemq/activemq-cpp/branches/activemq-cpp-3.1.x/activemq-cpp/src/test/decaf/lang/PointerTest.cpp

Propchange: activemq/activemq-cpp/branches/activemq-cpp-3.1.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jan 22 20:34:01 2010
@@ -1 +1 @@
-/activemq/activemq-cpp/trunk:890958-890972,891025
+/activemq/activemq-cpp/trunk:890958-890972,891025,902255

Modified: activemq/activemq-cpp/branches/activemq-cpp-3.1.x/activemq-cpp/src/main/decaf/lang/Pointer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.1.x/activemq-cpp/src/main/decaf/lang/Pointer.h?rev=902257&r1=902256&r2=902257&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.1.x/activemq-cpp/src/main/decaf/lang/Pointer.h
(original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.1.x/activemq-cpp/src/main/decaf/lang/Pointer.h
Fri Jan 22 20:34:01 2010
@@ -174,9 +174,10 @@
                 REFCOUNTER( value ), value( dynamic_cast<T*>( value.get() ) ), onDelete(
onDeleteFunc ) {
 
             if( this->value == NULL ) {
+
                 // Remove the reference we took in the Reference Counter's ctor since we
-                // didn't actually create one as the dynamic cast failed..
-                this->release();
+                // didn't actually create one as the dynamic cast failed.
+                REFCOUNTER::release();
                 throw decaf::lang::exceptions::ClassCastException(
                     __FILE__, __LINE__,
                     "Failed to cast source pointer of type %s to this type: %s.",

Modified: activemq/activemq-cpp/branches/activemq-cpp-3.1.x/activemq-cpp/src/test/decaf/lang/PointerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.1.x/activemq-cpp/src/test/decaf/lang/PointerTest.cpp?rev=902257&r1=902256&r2=902257&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.1.x/activemq-cpp/src/test/decaf/lang/PointerTest.cpp
(original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.1.x/activemq-cpp/src/test/decaf/lang/PointerTest.cpp
Fri Jan 22 20:34:01 2010
@@ -461,7 +461,6 @@
         "Should Throw a ClassCastException",
         ptrTestClassA2 = nullPointer.dynamicCast<TestClassA>(),
         ClassCastException );
-
 }
 
 ////////////////////////////////////////////////////////////////////////////////



Mime
View raw message