cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1449747 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ContainerRequestContextImpl.java
Date Mon, 25 Feb 2013 15:27:47 GMT
Author: sergeyb
Date: Mon Feb 25 15:27:46 2013
New Revision: 1449747

URL: http://svn.apache.org/r1449747
Log:
[CXF-4852] Minor fix to prevent NPE when new URI is the same as the base one

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ContainerRequestContextImpl.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ContainerRequestContextImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ContainerRequestContextImpl.java?rev=1449747&r1=1449746&r2=1449747&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ContainerRequestContextImpl.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ContainerRequestContextImpl.java
Mon Feb 25 15:27:46 2013
@@ -92,7 +92,10 @@ public class ContainerRequestContextImpl
                 setRequestUri(requestUri, URI.create("/"));
                 return;
             } else {
-                requestUriString = requestUriString.substring(baseUriString.length() + 1);
+                requestUriString = requestUriString.substring(baseUriString.length());
+                if (requestUriString.isEmpty()) {
+                    requestUriString = "/";
+                }
                 requestUri = URI.create(requestUriString);
             }
                 



Mime
View raw message