lburgazzoli 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_r349019889
########## 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: afaik, no scheme is also a synonymous of class path ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services