cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1304654 - in /cxf/branches/2.3.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriInfoImpl.java rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriInfoImplTest.java
Date Sun, 25 Mar 2012 18:16:10 GMT
Author: sergeyb
Date: Fri Mar 23 23:15:15 2012
New Revision: 1304654

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

................
  r1304650 | sergeyb | 2012-03-23 23:11:04 +0000 (Fri, 23 Mar 2012) | 16 lines
  
  Merged revisions 1304648 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes
  
  ................
    r1304648 | sergeyb | 2012-03-23 23:05:27 +0000 (Fri, 23 Mar 2012) | 9 lines
    
    Merged revisions 1304646 via svnmerge from 
    https://svn.apache.org/repos/asf/cxf/trunk
    
    ........
      r1304646 | sergeyb | 2012-03-23 22:59:30 +0000 (Fri, 23 Mar 2012) | 1 line
      
      [CXF-4200] Applying a modified patch on behalf of Rob ten Hove
    ........
  ................
................

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriInfoImpl.java
    cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriInfoImplTest.java

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Fri Mar 23 23:15:15 2012
@@ -0,0 +1,3 @@
+/cxf/branches/2.4.x-fixes:1304650
+/cxf/branches/2.5.x-fixes:1304648
+/cxf/trunk:1304646

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

Modified: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriInfoImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriInfoImpl.java?rev=1304654&r1=1304653&r2=1304654&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriInfoImpl.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriInfoImpl.java
Fri Mar 23 23:15:15 2012
@@ -102,7 +102,7 @@ public class UriInfoImpl implements UriI
     }
 
     public List<PathSegment> getPathSegments(boolean decode) {
-        return JAXRSUtils.getPathSegments(getPath(), decode);
+        return JAXRSUtils.getPathSegments(getPath(false), decode);
     }
 
     public MultivaluedMap<String, String> getQueryParameters() {

Modified: cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriInfoImplTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriInfoImplTest.java?rev=1304654&r1=1304653&r2=1304654&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriInfoImplTest.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriInfoImplTest.java
Fri Mar 23 23:15:15 2012
@@ -19,7 +19,10 @@
 
 package org.apache.cxf.jaxrs.impl;
 
+import java.util.List;
+
 import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.PathSegment;
 import javax.ws.rs.core.UriInfo;
 
 import org.apache.cxf.jaxrs.model.URITemplate;
@@ -61,6 +64,30 @@ public class UriInfoImplTest extends Ass
     }
     
     @Test
+    public void testGetPathSegments() {
+        
+        UriInfoImpl u = new UriInfoImpl(mockMessage("http://localhost:8080", "/bar/foo/x%2Fb"),
+                                        null);
+        List<PathSegment> segments = u.getPathSegments();
+        assertEquals(3, segments.size());
+        assertEquals("bar", segments.get(0).toString());
+        assertEquals("foo", segments.get(1).toString());
+        assertEquals("x/b", segments.get(2).toString());
+    }
+    
+    @Test
+    public void testGetEncodedPathSegments() {
+        
+        UriInfoImpl u = new UriInfoImpl(mockMessage("http://localhost:8080", "/bar/foo/x%2Fb"),
+                                        null);
+        List<PathSegment> segments = u.getPathSegments(false);
+        assertEquals(3, segments.size());
+        assertEquals("bar", segments.get(0).toString());
+        assertEquals("foo", segments.get(1).toString());
+        assertEquals("x%2Fb", segments.get(2).toString());
+    }
+    
+    @Test
     public void testGetAbsolutePathWithEncodedChars() {
         
         UriInfoImpl u = new UriInfoImpl(mockMessage("http://localhost:8080/baz%20foo", "/bar"),



Mime
View raw message