cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1469785 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
Date Fri, 19 Apr 2013 11:34:23 GMT
Author: sergeyb
Date: Fri Apr 19 11:34:23 2013
New Revision: 1469785

URL: http://svn.apache.org/r1469785
Log:
[CXF-4975] Appending a forward slash to Application path if needed

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java?rev=1469785&r1=1469784&r2=1469785&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
Fri Apr 19 11:34:23 2013
@@ -663,9 +663,12 @@ public final class ResourceUtils {
         if (!ignoreAppPath) {
             ApplicationPath appPath = app.getClass().getAnnotation(ApplicationPath.class);
             if (appPath != null) {
-                address = appPath.value().length() == 0 ? "/" : appPath.value();
+                address = appPath.value();
             }
         }
+        if (!address.startsWith("/")) {
+            address = "/" + address;
+        }
         bean.setAddress(address);
         bean.setStaticSubresourceResolution(staticSubresourceResolution);
         bean.setResourceClasses(resourceClasses);



Mime
View raw message