cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: [CXF-5849] Setting systemId on individual XSLT templates, patch from Vjacheslav Borisov applied
Date Mon, 07 Jul 2014 10:25:51 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 60859f042 -> 78a9a7b56


[CXF-5849] Setting systemId on individual XSLT templates, patch from Vjacheslav Borisov applied


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/78a9a7b5
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/78a9a7b5
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/78a9a7b5

Branch: refs/heads/2.7.x-fixes
Commit: 78a9a7b56886d1c6156e82ddd0333f5cda3b2175
Parents: 60859f0
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Mon Jul 7 11:16:43 2014 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Mon Jul 7 11:25:29 2014 +0100

----------------------------------------------------------------------
 .../java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/78a9a7b5/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java
index 5429ba6..5479225 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XSLTJaxbProvider.java
@@ -25,6 +25,7 @@ import java.io.OutputStream;
 import java.io.Reader;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Type;
+import java.net.URL;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -403,14 +404,15 @@ public class XSLTJaxbProvider<T> extends JAXBElementProvider<T>
{
     
     protected Templates createTemplates(String loc) {
         try {
-            InputStream is = ResourceUtils.getResourceStream(loc, this.getBus());
-            if (is == null) {
+            URL urlStream = ResourceUtils.getResourceURL(loc, this.getBus());
+            if (urlStream == null) {
                 return null;
             }
             
             Reader r = new BufferedReader(
-                           new InputStreamReader(is, "UTF-8"));
+                           new InputStreamReader(urlStream.openStream(), "UTF-8"));
             Source source = new StreamSource(r);
+            source.setSystemId(urlStream.toExternalForm());
             if (factory == null) {
                 factory = (SAXTransformerFactory)TransformerFactory.newInstance();
                 if (uriResolver != null) {


Mime
View raw message