aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1338868 - in /aries/branches/blueprint-0.3.2-fixes/blueprint-core: ./ src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java
Date Tue, 15 May 2012 19:58:21 GMT
Author: dkulp
Date: Tue May 15 19:58:20 2012
New Revision: 1338868

URL: http://svn.apache.org/viewvc?rev=1338868&view=rev
Log:
[ARIES-626] Port relative import patch from Aki Yoshida back

Modified:
    aries/branches/blueprint-0.3.2-fixes/blueprint-core/   (props changed)
    aries/branches/blueprint-0.3.2-fixes/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java

Propchange: aries/branches/blueprint-0.3.2-fixes/blueprint-core/
------------------------------------------------------------------------------
  Merged /aries/trunk/blueprint/blueprint-core:r1207637

Modified: aries/branches/blueprint-0.3.2-fixes/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java
URL: http://svn.apache.org/viewvc/aries/branches/blueprint-0.3.2-fixes/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java?rev=1338868&r1=1338867&r2=1338868&view=diff
==============================================================================
--- aries/branches/blueprint-0.3.2-fixes/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java
(original)
+++ aries/branches/blueprint-0.3.2-fixes/blueprint-core/src/main/java/org/apache/aries/blueprint/namespace/NamespaceHandlerRegistryImpl.java
Tue May 15 19:58:20 2012
@@ -299,8 +299,18 @@ public class NamespaceHandlerRegistryImp
                             return null;
                         }
                         for (NamespaceHandler h : hs) {
-                            final URL url = h.getSchemaLocation(namespaceURI);
+                            URL url = h.getSchemaLocation(namespaceURI);
                             if (url != null) {
+                                // handling include-relative-path case
+                                if (systemId != null && !systemId.matches("^[a-z][-+.0-9a-z]*:.*"))
{
+                                    try {
+                                        url = new URL(url, systemId);
+                                    } catch (Exception e) {
+                                        // ignore and use the given systemId
+                                    }
+                                }
+                                
+                                
                                 try {
                                     final StreamSource source 
                                         = new StreamSource(url.openStream(), url.toExternalForm());



Mime
View raw message