cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1466940 - /cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
Date Thu, 11 Apr 2013 16:21:13 GMT
Author: sergeyb
Date: Thu Apr 11 16:21:13 2013
New Revision: 1466940

URL: http://svn.apache.org/r1466940
Log:
[CXF-4946] Using a specific URL constructor to resolve the relative references with parent
segments

Modified:
    cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java

Modified: cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java?rev=1466940&r1=1466939&r2=1466940&view=diff
==============================================================================
--- cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
(original)
+++ cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
Thu Apr 11 16:21:13 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;



Mime
View raw message