You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2019/11/21 11:00:29 UTC

[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #456: Fix #455 Support only classpath: XSLT URIs

ppalaga commented on a change in pull request #456: Fix #455 Support only classpath: XSLT URIs
URL: https://github.com/apache/camel-quarkus/pull/456#discussion_r349021389
 
 

 ##########
 File path: extensions/xslt/deployment/src/main/java/org/apache/camel/quarkus/component/xslt/deployment/BuildTimeUriResolver.java
 ##########
 @@ -48,42 +37,26 @@ public ResolutionResult resolve(String templateUri) throws TransformerException
         final String scheme = ResourceHelper.getScheme(templateUri);
         final String effectiveScheme = scheme == null ? "classpath:" : scheme;
 
-        final String transletName;
-        final Source src;
-        if ("file:".equals(effectiveScheme)) {
-            final String compacted = compact(templateUri, scheme);
-            transletName = toTransletName(compacted);
-            final Path resolvedPath = baseDir.resolve(compacted);
-            try {
-                src = new StreamSource(Files.newInputStream(resolvedPath));
-            } catch (IOException e) {
-                throw new TransformerException("Could not read from file " + templateUri, e);
-            }
-        } else if ("classpath:".equals(effectiveScheme)) {
-            final String compacted = compact(templateUri, scheme);
-            transletName = toTransletName(compacted);
-            final URL url = getClass().getClassLoader().getResource(compacted);
-            try {
-                src = new StreamSource(url.openStream());
-            } catch (IOException e) {
-                throw new TransformerException("Could not read the class path resource " + templateUri, e);
-            }
+        if (!"classpath:".equals(effectiveScheme)) {
 
 Review comment:
   Yes, that's covered by the lines above https://github.com/apache/camel-quarkus/pull/456/files/ecd911af570372f846b242c597f73c9b6ce1c91f#diff-a4d51312ef4951bcb880ba4e9e863d0eR37-R38

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services