Author: rmannibucau Date: Tue Feb 19 18:23:23 2013 New Revision: 1447859 URL: http://svn.apache.org/r1447859 Log: TOMEE-776 uri can sometimes be a file path
Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/util/URLs.java Modified: tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/util/URLs.java URL: http://svn.apache.org/viewvc/tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/util/URLs.java?rev=1447859&r1=1447858&r2=1447859&view=diff ============================================================================== --- tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/util/URLs.java (original) +++ tomee/tomee/trunk/container/openejb-core/src/main/java/org/apache/openejb/util/URLs.java Tue Feb 19 18:23:23 2013 @@ -102,6 +102,12 @@ public class URLs { } public static URI uri(final String uri) { + if (!uri.startsWith("file") && !uri.startsWith("jar") && !uri.isEmpty()) { + final File f = new File(uri); + if (f.exists()) { + return f.toURI(); + } + } return URI.create(uri.replace(" ", "%20")); }