cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1027611 - in /cxf/branches/2.2.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java
Date Tue, 26 Oct 2010 16:03:43 GMT
Author: sergeyb
Date: Tue Oct 26 16:03:43 2010
New Revision: 1027611

URL: http://svn.apache.org/viewvc?rev=1027611&view=rev
Log:
Merged revisions 1027608 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.3.x-fixes

................
  r1027608 | sergeyb | 2010-10-26 17:00:43 +0100 (Tue, 26 Oct 2010) | 9 lines
  
  Merged revisions 1027599 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1027599 | sergeyb | 2010-10-26 16:52:30 +0100 (Tue, 26 Oct 2010) | 1 line
    
    [CXF-3088] : Fixing the UriBuilder.clone() losing a leading slash
  ........
................

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
    cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Oct 26 16:03:43 2010
@@ -1,2 +1,2 @@
-/cxf/branches/2.3.x-fixes:1027513
-/cxf/trunk:1027509
+/cxf/branches/2.3.x-fixes:1027513,1027608
+/cxf/trunk:1027509,1027599

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java?rev=1027611&r1=1027610&r2=1027611&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
Tue Oct 26 16:03:43 2010
@@ -300,7 +300,8 @@ public class UriBuilderImpl extends UriB
         builder.fragment = fragment;
         builder.query = new MetadataMap<String, String>(query);
         builder.matrix = new MetadataMap<String, String>(matrix);
-        builder.schemeSpecificPart = schemeSpecificPart; 
+        builder.schemeSpecificPart = schemeSpecificPart;
+        builder.leadingSlash = leadingSlash;
         return builder;
     }
 

Modified: cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java?rev=1027611&r1=1027610&r2=1027611&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java
Tue Oct 26 16:03:43 2010
@@ -153,6 +153,28 @@ public class UriBuilderImplTest extends 
     }
     
     @Test
+    public void testCloneWithoutLeadingSlash() throws Exception {
+        URI uri = new URI("bar/foo");
+        URI newUri = new UriBuilderImpl(uri).clone().build();   
+        assertEquals("URI is not built correctly", "bar/foo", newUri.toString());
+    }
+    
+    @Test
+    public void testCloneWithLeadingSlash() throws Exception {
+        URI uri = new URI("/bar/foo");
+        URI newUri = new UriBuilderImpl(uri).clone().build();   
+        assertEquals("URI is not built correctly", "/bar/foo", newUri.toString());
+    }
+    
+    @Test
+    public void testBuildWithLeadingSlash() throws Exception {
+        URI uri = new URI("/bar/foo");
+        URI newUri = UriBuilder.fromUri(uri).build();   
+        assertEquals("URI is not built correctly", "/bar/foo", newUri.toString());
+    }
+    
+    
+    @Test
     public void testClonePctEncodedFromUri() throws Exception {
         URI uri = new URI("http://bar/foo%20");
         URI newUri = new UriBuilderImpl(uri).clone().buildFromEncoded();   



Mime
View raw message