You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2013/04/15 12:41:43 UTC
svn commit: r1467931 - in /cxf/branches/2.7.x-fixes: ./
tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
Author: sergeyb
Date: Mon Apr 15 10:41:43 2013
New Revision: 1467931
URL: http://svn.apache.org/r1467931
Log:
Merged revisions 1466940 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1466940 | sergeyb | 2013-04-11 17:21:13 +0100 (Thu, 11 Apr 2013) | 1 line
[CXF-4946] Using a specific URL constructor to resolve the relative references with parent segments
........
Modified:
cxf/branches/2.7.x-fixes/ (props changed)
cxf/branches/2.7.x-fixes/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
Merged /cxf/trunk:r1466940
Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.7.x-fixes/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java?rev=1467931&r1=1467930&r2=1467931&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java (original)
+++ cxf/branches/2.7.x-fixes/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java Mon Apr 15 10:41:43 2013
@@ -1367,7 +1367,11 @@ public class SourceGenerator {
if (!href.startsWith("/") && !href.contains("..")) {
schemaURI = baseWadlPath + href;
} else {
- schemaURI = URI.create(baseWadlPath).resolve(href).toString();
+ try {
+ schemaURI = new URL(new URL(baseWadlPath), href).toString();
+ } catch (Exception ex) {
+ schemaURI = URI.create(baseWadlPath).resolve(href).toString();
+ }
}
} else {
schemaURI = href;