You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2013/06/18 12:22:14 UTC

svn commit: r1494095 - in /cxf/branches/2.6.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

Author: sergeyb
Date: Tue Jun 18 10:22:14 2013
New Revision: 1494095

URL: http://svn.apache.org/r1494095
Log:
Merged revisions 1494093 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes

................
  r1494093 | sergeyb | 2013-06-18 11:10:33 +0100 (Tue, 18 Jun 2013) | 9 lines
  
  Merged revisions 1494092 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1494092 | sergeyb | 2013-06-18 11:07:50 +0100 (Tue, 18 Jun 2013) | 1 line
    
    [CXF-5084] Updating UriBuilderImpl to better detect HTTP scheme, applying a patch on behalf of David Blevins
  ........
................

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

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/branches/2.7.x-fixes:r1494093
  Merged /cxf/trunk:r1494092

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

Modified: cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java?rev=1494095&r1=1494094&r2=1494095&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java (original)
+++ cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java Tue Jun 18 10:22:14 2013
@@ -623,7 +623,7 @@ public class UriBuilderImpl extends UriB
         // be supported though the use of non-http schemes for *building* new URIs
         // is pretty limited in the context of working with JAX-RS services
          
-        return path.startsWith("http");
+        return path.startsWith("http:") || path.startsWith("https:");
     }
     
     @Override

Modified: cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java?rev=1494095&r1=1494094&r2=1494095&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java (original)
+++ cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java Tue Jun 18 10:22:14 2013
@@ -354,6 +354,13 @@ public class UriBuilderImplTest extends 
     }
     
     @Test
+    public void testReplacePathHttpString() throws Exception {
+        URI uri = new URI("http://foo/bar/baz;m1=m1value");
+        URI newUri = new UriBuilderImpl(uri).replacePath("httppnewpath").build();
+        assertEquals("URI is not built correctly", "http://foo/httppnewpath", newUri.toString());
+    }
+    
+    @Test
     public void testReplaceNullPath() throws Exception {
         URI uri = new URI("http://foo/bar/baz;m1=m1value");
         URI newUri = new UriBuilderImpl(uri).replacePath(null).build();