You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2013/08/23 10:17:35 UTC

svn commit: r1516737 - /tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalResolver.java

Author: markt
Date: Fri Aug 23 08:17:34 2013
New Revision: 1516737

URL: http://svn.apache.org/r1516737
Log:
Fix resolving relative to a JAR location.
Based on r1103295 from webservices.
This fixes the Gump failures for the LocalResolver test that execute with JARs rather than classes.

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalResolver.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalResolver.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalResolver.java?rev=1516737&r1=1516736&r2=1516737&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalResolver.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/LocalResolver.java Fri Aug 23 08:17:34 2013
@@ -17,6 +17,7 @@
 package org.apache.tomcat.util.descriptor;
 
 import java.io.IOException;
+import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
@@ -119,9 +120,11 @@ public class LocalResolver implements En
             if (systemUri.isAbsolute()) {
                 return systemId;
             }
-            return new URI(baseURI).resolve(systemUri).toString();
+            return new URL(new URL(baseURI), systemId).toString();
         } catch (URISyntaxException e) {
             return systemId;
+        } catch (MalformedURLException e) {
+            return systemId;
         }
     }
 }
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org