Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 13203 invoked from network); 9 Feb 2009 20:44:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Feb 2009 20:44:54 -0000 Received: (qmail 50990 invoked by uid 500); 9 Feb 2009 20:44:54 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 50962 invoked by uid 500); 9 Feb 2009 20:44:54 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 50953 invoked by uid 99); 9 Feb 2009 20:44:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Feb 2009 12:44:54 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Feb 2009 20:44:53 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2A0042388CFB; Mon, 9 Feb 2009 20:44:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r742727 - in /activemq/activemq-cpp/trunk/src: main/decaf/net/URI.cpp test/decaf/net/URITest.cpp test/testRegistry.cpp Date: Mon, 09 Feb 2009 20:44:32 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090209204433.2A0042388CFB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tabish Date: Mon Feb 9 20:44:32 2009 New Revision: 742727 URL: http://svn.apache.org/viewvc?rev=742727&view=rev Log: Fix minor issue in the URI class. Modified: activemq/activemq-cpp/trunk/src/main/decaf/net/URI.cpp activemq/activemq-cpp/trunk/src/test/decaf/net/URITest.cpp activemq/activemq-cpp/trunk/src/test/testRegistry.cpp Modified: activemq/activemq-cpp/trunk/src/main/decaf/net/URI.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/decaf/net/URI.cpp?rev=742727&r1=742726&r2=742727&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/src/main/decaf/net/URI.cpp (original) +++ activemq/activemq-cpp/trunk/src/main/decaf/net/URI.cpp Mon Feb 9 20:44:32 2009 @@ -822,6 +822,7 @@ result.uri.setQuery( relative.uri.getQuery() ); // the result URI is the remainder of the relative URI's path result.uri.setPath( relativePath.substr( thisPath.length() ) ); + result.setSchemeSpecificPart(); return result; } @@ -875,7 +876,7 @@ result.uri.setPath( relative.uri.getPath() ); } else { // resolve a relative reference - std::size_t endindex = this->uri.getPath().find_last_of('/') + 1; + std::size_t endindex = this->uri.getPath().find_last_of('/') + 1; result.uri.setPath( normalize( this->uri.getPath().substr( 0, endindex ) + relative.uri.getPath() ) ); } Modified: activemq/activemq-cpp/trunk/src/test/decaf/net/URITest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/decaf/net/URITest.cpp?rev=742727&r1=742726&r2=742727&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/src/test/decaf/net/URITest.cpp (original) +++ activemq/activemq-cpp/trunk/src/test/decaf/net/URITest.cpp Mon Feb 9 20:44:32 2009 @@ -1523,6 +1523,14 @@ URI result( "p1" ); CPPUNIT_ASSERT( result.equals( one.relativize( two ) ) ); } + { + URI uri( "file", "", "/test/location", "" ); + URI base( "file", "", "/test", "" ); + + URI relative = base.relativize( uri ); + CPPUNIT_ASSERT( string( "location" ) == relative.getSchemeSpecificPart() ); + CPPUNIT_ASSERT( relative.getScheme() == "" ); + } } Modified: activemq/activemq-cpp/trunk/src/test/testRegistry.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/test/testRegistry.cpp?rev=742727&r1=742726&r2=742727&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/src/test/testRegistry.cpp (original) +++ activemq/activemq-cpp/trunk/src/test/testRegistry.cpp Mon Feb 9 20:44:32 2009 @@ -183,8 +183,8 @@ //CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::SocketFactoryTest ); //#include //CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::SocketTest ); -//#include -//CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URITest ); +#include +CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URITest ); //#include //CPPUNIT_TEST_SUITE_REGISTRATION( decaf::net::URISyntaxExceptionTest ); //#include