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:27:24 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.6.x-fixes 1daf48050 -> 9511ef7a2


[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/9511ef7a
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/9511ef7a
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/9511ef7a

Branch: refs/heads/2.6.x-fixes
Commit: 9511ef7a266cb785db1a2f13ad6ceca426f4018e
Parents: 1daf480
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:27:05 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/9511ef7a/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 fd68370..e098f6d 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;
@@ -387,14 +388,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