Author: dkulp
Date: Mon Mar 10 20:06:17 2008
New Revision: 635787
URL: http://svn.apache.org/viewvc?rev=635787&view=rev
Log:
Merged revisions 635780 via svnmerge from
https://svn.apache.org/repos/asf/incubator/cxf/trunk
........
r635780 | dkulp | 2008-03-10 22:38:09 -0400 (Mon, 10 Mar 2008) | 2 lines
[CXF-1465] Update URI parsing stuff to use the File object to help
........
Modified:
incubator/cxf/branches/2.0.x-fixes/ (props changed)
incubator/cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/util/URIParserUtil.java
Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
incubator/cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/util/URIParserUtil.java
URL:
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/util/URIParserUtil.java?rev=635787&r1=635786&r2=635787&view=diff
==============================================================================
---
incubator/cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/util/URIParserUtil.java
(original)
+++
incubator/cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/util/URIParserUtil.java
Mon Mar 10 20:06:17 2008
@@ -222,16 +222,19 @@
return url.toString().replace("\\", "/");
} catch (MalformedURLException e1) {
try {
+ File file = new File(uri);
+ if (file.exists()) {
+ return file.toURI().normalize().toString();
+ }
String f = null;
if (uri.indexOf(":") != -1 && !uri.startsWith("/")) {
f = "file:/" + uri;
} else {
f = "file:" + uri;
}
-
url = new URL(f);
return url.toString().replace("\\", "/");
- } catch (MalformedURLException e2) {
+ } catch (Exception e2) {
return uri.replace("\\", "/");
}
}