cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1103505 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
Date Sun, 15 May 2011 18:43:29 GMT
Author: sergeyb
Date: Sun May 15 18:43:29 2011
New Revision: 1103505

URL: http://svn.apache.org/viewvc?rev=1103505&view=rev
Log:
Fixing rt/frontend/jaxrs test failures on Win

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=1103505&r1=1103504&r2=1103505&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
Sun May 15 18:43:29 2011
@@ -28,7 +28,6 @@ import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.lang.reflect.Type;
-import java.net.URI;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
@@ -391,7 +390,8 @@ public final class ResourceUtils {
                 return null;
             }
         } else {
-            File f = new File(URI.create(loc).getRawPath());
+            String actualLoc = loc.startsWith("file:") ? loc.substring(5) : loc;
+            File f = new File(actualLoc);
             if (!f.exists()) {
                 LOG.warning("No file resource " + loc + " is available on local disk");
                 return null;



Mime
View raw message