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:45:14 UTC

svn commit: r1467934 - in /cxf/branches/2.6.x-fixes: ./ tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java

Author: sergeyb
Date: Mon Apr 15 10:45:13 2013
New Revision: 1467934

URL: http://svn.apache.org/r1467934
Log:
Merged revisions 1467931 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes

................
  r1467931 | sergeyb | 2013-04-15 11:41:43 +0100 (Mon, 15 Apr 2013) | 9 lines
  
  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.6.x-fixes/   (props changed)
    cxf/branches/2.6.x-fixes/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/branches/2.7.x-fixes:r1467931
  Merged /cxf/trunk:r1466940

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.6.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.6.x-fixes/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java?rev=1467934&r1=1467933&r2=1467934&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java (original)
+++ cxf/branches/2.6.x-fixes/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java Mon Apr 15 10:45:13 2013
@@ -1345,7 +1345,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;