camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/4] camel git commit: CAMEL-9349: ResourceHelper - Allow to load resource from registry
Date Sat, 28 Nov 2015 08:00:05 GMT
CAMEL-9349: ResourceHelper - Allow to load resource from registry


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0f7b73aa
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0f7b73aa
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0f7b73aa

Branch: refs/heads/master
Commit: 0f7b73aaae579c4f2757c795a9d397d6ab59984f
Parents: 14784c1
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sat Nov 28 08:18:46 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sat Nov 28 08:18:46 2015 +0100

----------------------------------------------------------------------
 .../camel/component/apns/factory/ApnsServiceFactory.java     | 2 +-
 .../org/apache/camel/dataformat/beanio/BeanIODataFormat.java | 2 +-
 .../org/apache/camel/component/cache/CacheComponent.java     | 2 +-
 .../org/apache/camel/converter/crypto/PGPDataFormatUtil.java | 2 +-
 .../java/org/apache/camel/component/dozer/DozerEndpoint.java | 2 +-
 .../org/apache/camel/component/dozer/ExpressionMapper.java   | 2 +-
 .../apache/camel/component/flatpack/FlatpackEndpoint.java    | 4 ++--
 .../apache/camel/dataformat/flatpack/FlatpackDataFormat.java | 8 ++++----
 .../java/org/apache/camel/component/fop/FopEndpoint.java     | 2 +-
 .../apache/camel/component/file/remote/SftpOperations.java   | 4 ++--
 .../org/apache/camel/component/gae/auth/GAuthJksLoader.java  | 2 +-
 .../org/apache/camel/component/gae/auth/GAuthPk8Loader.java  | 2 +-
 .../org/apache/camel/component/ibatis/IBatisComponent.java   | 2 +-
 .../apache/camel/component/validator/jing/JingEndpoint.java  | 2 +-
 .../org/apache/camel/component/jolt/JoltFirstSampleTest.java | 6 ++----
 .../org/apache/camel/component/mybatis/MyBatisComponent.java | 2 +-
 .../org/apache/camel/component/quartz/QuartzComponent.java   | 2 +-
 .../org/apache/camel/component/quartz2/QuartzComponent.java  | 2 +-
 .../camel/component/schematron/SchematronEndpoint.java       | 2 +-
 .../servletlistener/CamelServletContextListener.java         | 2 +-
 .../apache/camel/component/velocity/VelocityEndpoint.java    | 2 +-
 21 files changed, 27 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/0f7b73aa/components/camel-apns/src/main/java/org/apache/camel/component/apns/factory/ApnsServiceFactory.java
----------------------------------------------------------------------
diff --git a/components/camel-apns/src/main/java/org/apache/camel/component/apns/factory/ApnsServiceFactory.java
b/components/camel-apns/src/main/java/org/apache/camel/component/apns/factory/ApnsServiceFactory.java
index 0557d2c..9f917da 100644
--- a/components/camel-apns/src/main/java/org/apache/camel/component/apns/factory/ApnsServiceFactory.java
+++ b/components/camel-apns/src/main/java/org/apache/camel/component/apns/factory/ApnsServiceFactory.java
@@ -202,7 +202,7 @@ public class ApnsServiceFactory implements CamelContextAware {
 
         InputStream certificateInputStream = null;
         try {
-            certificateInputStream = ResourceHelper.resolveMandatoryResourceAsInputStream(camelContext.getClassResolver(),
getCertificatePath());
+            certificateInputStream = ResourceHelper.resolveMandatoryResourceAsInputStream(camelContext,
getCertificatePath());
             builder.withCert(certificateInputStream, getCertificatePassword());
         } finally {
             ResourceUtils.close(certificateInputStream);

http://git-wip-us.apache.org/repos/asf/camel/blob/0f7b73aa/components/camel-beanio/src/main/java/org/apache/camel/dataformat/beanio/BeanIODataFormat.java
----------------------------------------------------------------------
diff --git a/components/camel-beanio/src/main/java/org/apache/camel/dataformat/beanio/BeanIODataFormat.java
b/components/camel-beanio/src/main/java/org/apache/camel/dataformat/beanio/BeanIODataFormat.java
index fb2ed4c..5af26f7 100644
--- a/components/camel-beanio/src/main/java/org/apache/camel/dataformat/beanio/BeanIODataFormat.java
+++ b/components/camel-beanio/src/main/java/org/apache/camel/dataformat/beanio/BeanIODataFormat.java
@@ -87,7 +87,7 @@ public class BeanIODataFormat extends ServiceSupport implements DataFormat,
Data
             factory = StreamFactory.newInstance();
 
             // Load the mapping file using the resource helper to ensure it can be loaded
in OSGi and other environments
-            InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(),
mapping);
+            InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(),
mapping);
             try {
                 if (properties != null) {
                     factory.load(is, properties);

http://git-wip-us.apache.org/repos/asf/camel/blob/0f7b73aa/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java
b/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java
index e15ba85..59aceac 100755
--- a/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java
+++ b/components/camel-cache/src/main/java/org/apache/camel/component/cache/CacheComponent.java
@@ -102,7 +102,7 @@ public class CacheComponent extends UriEndpointComponent {
         super.doStart();
         if (cacheManagerFactory == null) {
             if (configurationFile != null) {
-                InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(),
configurationFile);
+                InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(),
configurationFile);
                 cacheManagerFactory = new DefaultCacheManagerFactory(is, configurationFile);
             } else {
                 cacheManagerFactory = new DefaultCacheManagerFactory();

http://git-wip-us.apache.org/repos/asf/camel/blob/0f7b73aa/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/PGPDataFormatUtil.java
----------------------------------------------------------------------
diff --git a/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/PGPDataFormatUtil.java
b/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/PGPDataFormatUtil.java
index 6f8f815..a46156e 100644
--- a/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/PGPDataFormatUtil.java
+++ b/components/camel-crypto/src/main/java/org/apache/camel/converter/crypto/PGPDataFormatUtil.java
@@ -185,7 +185,7 @@ public final class PGPDataFormatUtil {
         if (keyRing != null) {
             is = new ByteArrayInputStream(keyRing);
         } else {
-            is = ResourceHelper.resolveMandatoryResourceAsInputStream(context.getClassResolver(),
filename);
+            is = ResourceHelper.resolveMandatoryResourceAsInputStream(context, filename);
         }
         return is;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/0f7b73aa/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerEndpoint.java
b/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerEndpoint.java
index 02e1775..eae218c 100644
--- a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerEndpoint.java
+++ b/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/DozerEndpoint.java
@@ -126,7 +126,7 @@ public class DozerEndpoint extends DefaultEndpoint {
         try {
             LOG.info("Loading Dozer mapping file {}.", configuration.getMappingFile());
             // create the mapper instance and add the mapping file
-            mapStream = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(),
configuration.getMappingFile());
+            mapStream = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(),
configuration.getMappingFile());
             answer.addMapping(mapStream);
         } finally {
             IOHelper.close(mapStream);

http://git-wip-us.apache.org/repos/asf/camel/blob/0f7b73aa/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/ExpressionMapper.java
----------------------------------------------------------------------
diff --git a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/ExpressionMapper.java
b/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/ExpressionMapper.java
index 9a6ec17..77e54ae 100644
--- a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/ExpressionMapper.java
+++ b/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/ExpressionMapper.java
@@ -98,7 +98,7 @@ public class ExpressionMapper extends BaseConverter {
      * @throws IOException is thrown if resource is not found or cannot be loaded
      */
     protected InputStream loadResource(String uri) throws IOException {
-        return ResourceHelper.resolveMandatoryResourceAsInputStream(currentExchange.get().getContext().getClassResolver(),
uri);
+        return ResourceHelper.resolveMandatoryResourceAsInputStream(currentExchange.get().getContext(),
uri);
     }
     
     /**

http://git-wip-us.apache.org/repos/asf/camel/blob/0f7b73aa/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/FlatpackEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/FlatpackEndpoint.java
b/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/FlatpackEndpoint.java
index e6c9111..8c5cabe 100644
--- a/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/FlatpackEndpoint.java
+++ b/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/FlatpackEndpoint.java
@@ -118,7 +118,7 @@ public class FlatpackEndpoint extends DefaultPollingEndpoint {
     }
 
     protected Parser createFixedParser(String resourceUri, Reader bodyReader) throws IOException
{
-        InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(),
resourceUri);
+        InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(),
resourceUri);
         InputStreamReader reader = new InputStreamReader(is);
         Parser parser = getParserFactory().newFixedLengthParser(reader, bodyReader);
         if (isAllowShortLines()) {
@@ -139,7 +139,7 @@ public class FlatpackEndpoint extends DefaultPollingEndpoint {
         if (ObjectHelper.isEmpty(getResourceUri())) {
             parser = getParserFactory().newDelimitedParser(bodyReader, delimiter, textQualifier);
         } else {
-            InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(),
resourceUri);
+            InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(),
resourceUri);
             InputStreamReader reader = new InputStreamReader(is, IOHelper.getCharsetName(exchange));
             parser = getParserFactory().newDelimitedParser(reader, bodyReader, delimiter,
textQualifier, ignoreFirstRecord);
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/0f7b73aa/components/camel-flatpack/src/main/java/org/apache/camel/dataformat/flatpack/FlatpackDataFormat.java
----------------------------------------------------------------------
diff --git a/components/camel-flatpack/src/main/java/org/apache/camel/dataformat/flatpack/FlatpackDataFormat.java
b/components/camel-flatpack/src/main/java/org/apache/camel/dataformat/flatpack/FlatpackDataFormat.java
index 941f819..281d9f2 100644
--- a/components/camel-flatpack/src/main/java/org/apache/camel/dataformat/flatpack/FlatpackDataFormat.java
+++ b/components/camel-flatpack/src/main/java/org/apache/camel/dataformat/flatpack/FlatpackDataFormat.java
@@ -206,7 +206,7 @@ public class FlatpackDataFormat extends ServiceSupport implements DataFormat,
Da
 
     protected Parser createParser(Exchange exchange, Reader bodyReader) throws IOException
{
         if (isFixed()) {
-            InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(exchange.getContext().getClassResolver(),
getDefinition());
+            InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(exchange.getContext(),
getDefinition());
             InputStreamReader reader = new InputStreamReader(is, IOHelper.getCharsetName(exchange));
             Parser parser = getParserFactory().newFixedLengthParser(reader, bodyReader);
             if (allowShortLines) {
@@ -222,7 +222,7 @@ public class FlatpackDataFormat extends ServiceSupport implements DataFormat,
Da
             if (ObjectHelper.isEmpty(getDefinition())) {
                 return getParserFactory().newDelimitedParser(bodyReader, delimiter, textQualifier);
             } else {
-                InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(exchange.getContext().getClassResolver(),
getDefinition());
+                InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(exchange.getContext(),
getDefinition());
                 InputStreamReader reader = new InputStreamReader(is, IOHelper.getCharsetName(exchange));
                 Parser parser = getParserFactory().newDelimitedParser(reader, bodyReader,
delimiter, textQualifier, ignoreFirstRecord);
                 if (allowShortLines) {
@@ -240,7 +240,7 @@ public class FlatpackDataFormat extends ServiceSupport implements DataFormat,
Da
 
     private Writer createWriter(Exchange exchange, Map<String, Object> firstRow, OutputStream
stream) throws JDOMException, IOException {
         if (isFixed()) {
-            InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(exchange.getContext().getClassResolver(),
getDefinition());
+            InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(exchange.getContext(),
getDefinition());
             InputStreamReader reader = new InputStreamReader(is, IOHelper.getCharsetName(exchange));
             FixedWriterFactory factory = new FixedWriterFactory(reader);
             return factory.createWriter(new OutputStreamWriter(stream, IOHelper.getCharsetName(exchange)));
@@ -253,7 +253,7 @@ public class FlatpackDataFormat extends ServiceSupport implements DataFormat,
Da
                 }
                 return factory.createWriter(new OutputStreamWriter(stream, IOHelper.getCharsetName(exchange)));
             } else {
-                InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(exchange.getContext().getClassResolver(),
getDefinition());
+                InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(exchange.getContext(),
getDefinition());
                 InputStreamReader reader = new InputStreamReader(is, IOHelper.getCharsetName(exchange));
                 DelimiterWriterFactory factory = new DelimiterWriterFactory(reader, delimiter,
textQualifier);
                 return factory.createWriter(new OutputStreamWriter(stream, IOHelper.getCharsetName(exchange)));

http://git-wip-us.apache.org/repos/asf/camel/blob/0f7b73aa/components/camel-fop/src/main/java/org/apache/camel/component/fop/FopEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-fop/src/main/java/org/apache/camel/component/fop/FopEndpoint.java
b/components/camel-fop/src/main/java/org/apache/camel/component/fop/FopEndpoint.java
index 8826f02..2cffd26 100644
--- a/components/camel-fop/src/main/java/org/apache/camel/component/fop/FopEndpoint.java
+++ b/components/camel-fop/src/main/java/org/apache/camel/component/fop/FopEndpoint.java
@@ -109,7 +109,7 @@ public class FopEndpoint extends DefaultEndpoint {
         }
 
         if (userConfigURL != null) {
-            InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(),
userConfigURL);
+            InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(),
userConfigURL);
             updateConfigurations(is, fopFactory);
         }
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/0f7b73aa/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
index ab7e649..bd25fb0 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/SftpOperations.java
@@ -211,7 +211,7 @@ public class SftpOperations implements RemoteFileOperations<ChannelSftp.LsEntry>
                 }
             }
             try {
-                InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(endpoint.getCamelContext().getClassResolver(),
sftpConfig.getPrivateKeyUri());
+                InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(endpoint.getCamelContext(),
sftpConfig.getPrivateKeyUri());
                 ByteArrayOutputStream bos = new ByteArrayOutputStream();
                 IOHelper.copyAndCloseInput(is, bos);
                 jsch.addIdentity("ID", bos.toByteArray(), null, passphrase);
@@ -244,7 +244,7 @@ public class SftpOperations implements RemoteFileOperations<ChannelSftp.LsEntry>
         if (isNotEmpty(sftpConfig.getKnownHostsUri())) {
             LOG.debug("Using knownhosts uri: {}", sftpConfig.getKnownHostsUri());
             try {
-                InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(endpoint.getCamelContext().getClassResolver(),
sftpConfig.getKnownHostsUri());
+                InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(endpoint.getCamelContext(),
sftpConfig.getKnownHostsUri());
                 jsch.setKnownHosts(is);
             } catch (IOException e) {
                 throw new JSchException("Cannot read resource: " + sftpConfig.getKnownHostsUri(),
e);

http://git-wip-us.apache.org/repos/asf/camel/blob/0f7b73aa/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthJksLoader.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthJksLoader.java
b/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthJksLoader.java
index 1c7b0a7..8531bf0 100644
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthJksLoader.java
+++ b/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthJksLoader.java
@@ -88,7 +88,7 @@ public class GAuthJksLoader implements GAuthKeyLoader {
      * Loads a private key from a Java keystore depending on this loader's properties.
      */
     public PrivateKey loadPrivateKey() throws Exception {
-        InputStream input = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(),
keyStoreLocation);
+        InputStream input = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(),
keyStoreLocation);
         try {
             return loadPrivateKey(input);
         } finally {

http://git-wip-us.apache.org/repos/asf/camel/blob/0f7b73aa/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthPk8Loader.java
----------------------------------------------------------------------
diff --git a/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthPk8Loader.java
b/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthPk8Loader.java
index 05da8e3..4068189 100644
--- a/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthPk8Loader.java
+++ b/components/camel-gae/src/main/java/org/apache/camel/component/gae/auth/GAuthPk8Loader.java
@@ -56,7 +56,7 @@ public class GAuthPk8Loader implements GAuthKeyLoader {
      * Loads a private key from a PKCS#8 file.
      */
     public PrivateKey loadPrivateKey() throws Exception {
-        InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(),
keyLocation);
+        InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(),
keyLocation);
         String str;
         try {
             str = getCamelContext().getTypeConverter().mandatoryConvertTo(String.class, is);

http://git-wip-us.apache.org/repos/asf/camel/blob/0f7b73aa/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/IBatisComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/IBatisComponent.java
b/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/IBatisComponent.java
index 157ecbc..378cba0 100644
--- a/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/IBatisComponent.java
+++ b/components/camel-ibatis/src/main/java/org/apache/camel/component/ibatis/IBatisComponent.java
@@ -81,7 +81,7 @@ public class IBatisComponent extends UriEndpointComponent {
     }
 
     protected SqlMapClient createSqlMapClient() throws IOException {
-        InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(),
sqlMapConfig);
+        InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(),
sqlMapConfig);
         return SqlMapClientBuilder.buildSqlMapClient(is);
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/0f7b73aa/components/camel-jing/src/main/java/org/apache/camel/component/validator/jing/JingEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-jing/src/main/java/org/apache/camel/component/validator/jing/JingEndpoint.java
b/components/camel-jing/src/main/java/org/apache/camel/component/validator/jing/JingEndpoint.java
index 513c415..56eb0d8 100644
--- a/components/camel-jing/src/main/java/org/apache/camel/component/validator/jing/JingEndpoint.java
+++ b/components/camel-jing/src/main/java/org/apache/camel/component/validator/jing/JingEndpoint.java
@@ -124,7 +124,7 @@ public class JingEndpoint extends DefaultEndpoint {
 
         if (inputSource == null) {
             ObjectHelper.notEmpty(resourceUri, "resourceUri", this);
-            InputStream inputStream = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(),
resourceUri);
+            InputStream inputStream = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(),
resourceUri);
             inputSource = new InputSource(inputStream);
         }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/0f7b73aa/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltFirstSampleTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltFirstSampleTest.java
b/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltFirstSampleTest.java
index 325aacd..a70cc5b 100644
--- a/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltFirstSampleTest.java
+++ b/components/camel-jolt/src/test/java/org/apache/camel/component/jolt/JoltFirstSampleTest.java
@@ -33,15 +33,13 @@ public class JoltFirstSampleTest extends CamelTestSupport {
         getMockEndpoint("mock:result").expectedBodiesReceived(
             IOHelper.loadText(
                 ResourceHelper.resolveMandatoryResourceAsInputStream(
-                    context.getClassResolver() ,
-                    "org/apache/camel/component/jolt/firstSample/output.json")
+                    context, "org/apache/camel/component/jolt/firstSample/output.json")
             ).trim() // Remove the last newline added by IOHelper.loadText()
         );
         
         sendBody("direct://start", 
                 ResourceHelper.resolveMandatoryResourceAsInputStream(
-                        context.getClassResolver(),
-                        "org/apache/camel/component/jolt/firstSample/input.json"));
+                        context, "org/apache/camel/component/jolt/firstSample/input.json"));
         
         assertMockEndpointsSatisfied();
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/0f7b73aa/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisComponent.java
b/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisComponent.java
index d0f260c..fa9ec7f 100644
--- a/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisComponent.java
+++ b/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisComponent.java
@@ -49,7 +49,7 @@ public class MyBatisComponent extends UriEndpointComponent {
 
     protected SqlSessionFactory createSqlSessionFactory() throws IOException {
         ObjectHelper.notNull(configurationUri, "configurationUri", this);
-        InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(),
configurationUri);
+        InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(),
configurationUri);
         try {
             return new SqlSessionFactoryBuilder().build(is);
         } finally {

http://git-wip-us.apache.org/repos/asf/camel/blob/0f7b73aa/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
index 5aad713..5bcea28 100644
--- a/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
+++ b/components/camel-quartz/src/main/java/org/apache/camel/component/quartz/QuartzComponent.java
@@ -488,7 +488,7 @@ public class QuartzComponent extends UriEndpointComponent implements StartupList
             LOG.info("Loading Quartz properties file from: {}", getPropertiesFile());
             InputStream is = null;
             try {
-                is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(),
getPropertiesFile());
+                is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(),
getPropertiesFile());
                 answer = new Properties();
                 answer.load(is);
             } catch (IOException e) {

http://git-wip-us.apache.org/repos/asf/camel/blob/0f7b73aa/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzComponent.java
b/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzComponent.java
index 33dea2a..993166c 100644
--- a/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzComponent.java
+++ b/components/camel-quartz2/src/main/java/org/apache/camel/component/quartz2/QuartzComponent.java
@@ -258,7 +258,7 @@ public class QuartzComponent extends UriEndpointComponent implements StartupList
             LOG.info("Loading Quartz properties file from: {}", getPropertiesFile());
             InputStream is = null;
             try {
-                is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(),
getPropertiesFile());
+                is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(),
getPropertiesFile());
                 answer = new Properties();
                 answer.load(is);
             } catch (IOException e) {

http://git-wip-us.apache.org/repos/asf/camel/blob/0f7b73aa/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
index bc63b8e..35a9868 100644
--- a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
+++ b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
@@ -127,7 +127,7 @@ public class SchematronEndpoint extends DefaultEndpoint {
             try {
                 // Attempt to read the schematron rules  from the class path first.
                 LOG.debug("Reading schematron rules from class path {}", path);
-                InputStream schRules = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(),
path);
+                InputStream schRules = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(),
path);
                 rules = TemplatesFactory.newInstance().getTemplates(schRules, transformerFactory);
             } catch (Exception e) {
                 // Attempts from the file system.

http://git-wip-us.apache.org/repos/asf/camel/blob/0f7b73aa/components/camel-servletlistener/src/main/java/org/apache/camel/component/servletlistener/CamelServletContextListener.java
----------------------------------------------------------------------
diff --git a/components/camel-servletlistener/src/main/java/org/apache/camel/component/servletlistener/CamelServletContextListener.java
b/components/camel-servletlistener/src/main/java/org/apache/camel/component/servletlistener/CamelServletContextListener.java
index cb99d9f..0e53b07 100644
--- a/components/camel-servletlistener/src/main/java/org/apache/camel/component/servletlistener/CamelServletContextListener.java
+++ b/components/camel-servletlistener/src/main/java/org/apache/camel/component/servletlistener/CamelServletContextListener.java
@@ -417,7 +417,7 @@ public abstract class CamelServletContextListener<R extends Registry>
implements
                             // XML resource from classpath or file system
                             InputStream is = null;
                             try {
-                                is = ResourceHelper.resolveMandatoryResourceAsInputStream(camelContext.getClassResolver(),
value);
+                                is = ResourceHelper.resolveMandatoryResourceAsInputStream(camelContext,
value);
                                 target = camelContext.loadRoutesDefinition(is);
                             } catch (Exception e) {
                                 throw new RuntimeException("Error loading routes from resource:
" + value, e);

http://git-wip-us.apache.org/repos/asf/camel/blob/0f7b73aa/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityEndpoint.java
b/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityEndpoint.java
index d36da1f..c36c7d1 100644
--- a/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityEndpoint.java
+++ b/components/camel-velocity/src/main/java/org/apache/camel/component/velocity/VelocityEndpoint.java
@@ -92,7 +92,7 @@ public class VelocityEndpoint extends ResourceEndpoint {
 
             // load the velocity properties from property file which may overrides the default
ones
             if (ObjectHelper.isNotEmpty(getPropertiesFile())) {
-                InputStream reader = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(),
getPropertiesFile());
+                InputStream reader = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(),
getPropertiesFile());
                 try {
                     properties.load(reader);
                     log.info("Loaded the velocity configuration file " + getPropertiesFile());


Mime
View raw message