camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [5/5] camel git commit: CAMEL-8234: DefaultClassLoader - Should use applicationContextClassLoader from CamelContext as fallback
Date Tue, 13 Jan 2015 07:00:28 GMT
CAMEL-8234: DefaultClassLoader - Should use applicationContextClassLoader from CamelContext
as fallback


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

Branch: refs/heads/master
Commit: 0d827ee76032e40854b19b12ddbbf4f3b7672e21
Parents: 446d48f
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Tue Jan 13 07:31:00 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Tue Jan 13 07:31:00 2015 +0100

----------------------------------------------------------------------
 .../apache/camel/converter/ConverterTest.java   |  2 +-
 .../org/apache/camel/converter/JaxpTest.java    |  2 +-
 .../camel/converter/StringSourceTest.java       |  2 +-
 .../camel/impl/DefaultClassResolverTest.java    | 24 ++++++++++----------
 .../camel/core/osgi/OsgiFactoryFinderTest.java  |  2 +-
 .../dozer/CamelToDozerClassResolverAdapter.java |  2 +-
 .../camel/component/jcr/JcrConverterTest.java   |  2 +-
 .../http/HttpServerSharedPipelineFactory.java   |  2 +-
 .../HttpServerSharedInitializerFactory.java     |  2 +-
 .../test/blueprint/CamelBlueprintHelper.java    |  2 +-
 .../XStreamDataFormatDriverConfigTest.java      |  2 +-
 11 files changed, 22 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/0d827ee7/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java b/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java
index 8d0c678..9a294cb 100644
--- a/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java
+++ b/camel-core/src/test/java/org/apache/camel/converter/ConverterTest.java
@@ -52,7 +52,7 @@ public class ConverterTest extends TestCase {
     private static final Logger LOG = LoggerFactory.getLogger(ConverterTest.class);
 
     protected TypeConverter converter = new DefaultTypeConverter(new DefaultPackageScanClassResolver(),
-            new ReflectionInjector(), new DefaultFactoryFinderResolver().resolveDefaultFactoryFinder(new
DefaultClassResolver(null)));
+            new ReflectionInjector(), new DefaultFactoryFinderResolver().resolveDefaultFactoryFinder(new
DefaultClassResolver()));
 
     public static class IntegerPropertyEditor extends PropertyEditorSupport {
         public void setAsText(String text) throws IllegalArgumentException {

http://git-wip-us.apache.org/repos/asf/camel/blob/0d827ee7/camel-core/src/test/java/org/apache/camel/converter/JaxpTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/converter/JaxpTest.java b/camel-core/src/test/java/org/apache/camel/converter/JaxpTest.java
index 01b8da1..0638b39 100644
--- a/camel-core/src/test/java/org/apache/camel/converter/JaxpTest.java
+++ b/camel-core/src/test/java/org/apache/camel/converter/JaxpTest.java
@@ -42,7 +42,7 @@ import org.slf4j.LoggerFactory;
 public class JaxpTest extends TestCase {
     private static final Logger LOG = LoggerFactory.getLogger(JaxpTest.class);
     protected TypeConverter converter = new DefaultTypeConverter(new DefaultPackageScanClassResolver(),
-            new ReflectionInjector(), new DefaultFactoryFinderResolver().resolveDefaultFactoryFinder(new
DefaultClassResolver(null)));
+            new ReflectionInjector(), new DefaultFactoryFinderResolver().resolveDefaultFactoryFinder(new
DefaultClassResolver()));
 
     @Override
     protected void setUp() throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/0d827ee7/camel-core/src/test/java/org/apache/camel/converter/StringSourceTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/converter/StringSourceTest.java b/camel-core/src/test/java/org/apache/camel/converter/StringSourceTest.java
index 632bf4b..1e310ea 100644
--- a/camel-core/src/test/java/org/apache/camel/converter/StringSourceTest.java
+++ b/camel-core/src/test/java/org/apache/camel/converter/StringSourceTest.java
@@ -37,7 +37,7 @@ import org.apache.camel.util.ServiceHelper;
  */
 public class StringSourceTest extends TestCase {
     protected TypeConverter converter = new DefaultTypeConverter(new DefaultPackageScanClassResolver(),
-            new ReflectionInjector(), new DefaultFactoryFinderResolver().resolveDefaultFactoryFinder(new
DefaultClassResolver(null)));
+            new ReflectionInjector(), new DefaultFactoryFinderResolver().resolveDefaultFactoryFinder(new
DefaultClassResolver()));
     protected String expectedBody = "<hello>world!</hello>";
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/0d827ee7/camel-core/src/test/java/org/apache/camel/impl/DefaultClassResolverTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/impl/DefaultClassResolverTest.java
b/camel-core/src/test/java/org/apache/camel/impl/DefaultClassResolverTest.java
index fc2f9c4..d73aa58 100644
--- a/camel-core/src/test/java/org/apache/camel/impl/DefaultClassResolverTest.java
+++ b/camel-core/src/test/java/org/apache/camel/impl/DefaultClassResolverTest.java
@@ -27,43 +27,43 @@ import junit.framework.TestCase;
 public class DefaultClassResolverTest extends TestCase {
 
     public void testResolveClass() {
-        DefaultClassResolver resolver = new DefaultClassResolver(null);
+        DefaultClassResolver resolver = new DefaultClassResolver();
         Class<?> clazz = resolver.resolveClass("java.lang.Integer");
         assertNotNull(clazz);
     }
 
     public void testResolveClassType() {
-        DefaultClassResolver resolver = new DefaultClassResolver(null);
+        DefaultClassResolver resolver = new DefaultClassResolver();
         Class<Integer> clazz = resolver.resolveClass("java.lang.Integer", Integer.class);
         assertNotNull(clazz);
     }
 
     public void testResolveClassClassLoader() {
-        DefaultClassResolver resolver = new DefaultClassResolver(null);
+        DefaultClassResolver resolver = new DefaultClassResolver();
         Class<?> clazz = resolver.resolveClass("java.lang.Integer", DefaultClassResolverTest.class.getClassLoader());
         assertNotNull(clazz);
     }
 
     public void testResolveClassClassLoaderType() {
-        DefaultClassResolver resolver = new DefaultClassResolver(null);
+        DefaultClassResolver resolver = new DefaultClassResolver();
         Class<Integer> clazz = resolver.resolveClass("java.lang.Integer", Integer.class,
DefaultClassResolverTest.class.getClassLoader());
         assertNotNull(clazz);
     }
 
     public void testResolveMandatoryClass() throws Exception {
-        DefaultClassResolver resolver = new DefaultClassResolver(null);
+        DefaultClassResolver resolver = new DefaultClassResolver();
         Class<?> clazz = resolver.resolveMandatoryClass("java.lang.Integer");
         assertNotNull(clazz);
     }
 
     public void testResolveMandatoryClassType()throws Exception {
-        DefaultClassResolver resolver = new DefaultClassResolver(null);
+        DefaultClassResolver resolver = new DefaultClassResolver();
         Class<Integer> clazz = resolver.resolveMandatoryClass("java.lang.Integer",
Integer.class);
         assertNotNull(clazz);
     }
 
     public void testResolveMandatorySimpleClassType()throws Exception {
-        DefaultClassResolver resolver = new DefaultClassResolver(null);
+        DefaultClassResolver resolver = new DefaultClassResolver();
 
         Class<Byte> clazz = resolver.resolveMandatoryClass("Byte", Byte.class);
         assertNotNull(clazz);
@@ -97,19 +97,19 @@ public class DefaultClassResolverTest extends TestCase {
     }
 
     public void testResolveMandatoryClassClassLoader() throws Exception {
-        DefaultClassResolver resolver = new DefaultClassResolver(null);
+        DefaultClassResolver resolver = new DefaultClassResolver();
         Class<?> clazz = resolver.resolveMandatoryClass("java.lang.Integer", DefaultClassResolverTest.class.getClassLoader());
         assertNotNull(clazz);
     }
 
     public void testResolveMandatoryClassClassLoaderType() throws Exception {
-        DefaultClassResolver resolver = new DefaultClassResolver(null);
+        DefaultClassResolver resolver = new DefaultClassResolver();
         Class<Integer> clazz = resolver.resolveMandatoryClass("java.lang.Integer",
Integer.class, DefaultClassResolverTest.class.getClassLoader());
         assertNotNull(clazz);
     }
 
     public void testResolveMandatoryClassNotFound()  {
-        DefaultClassResolver resolver = new DefaultClassResolver(null);
+        DefaultClassResolver resolver = new DefaultClassResolver();
         try {
             resolver.resolveMandatoryClass("com.FooBar");
             fail("Should thrown an exception");
@@ -119,13 +119,13 @@ public class DefaultClassResolverTest extends TestCase {
     }
 
     public void testLoadResourceAsUri() {
-        DefaultClassResolver resolver = new DefaultClassResolver(null);
+        DefaultClassResolver resolver = new DefaultClassResolver();
         URL url = resolver.loadResourceAsURL("log4j.properties");
         assertNotNull(url);
     }
 
     public void testLoadResourceAsStream() {
-        DefaultClassResolver resolver = new DefaultClassResolver(null);
+        DefaultClassResolver resolver = new DefaultClassResolver();
         InputStream is = resolver.loadResourceAsStream("log4j.properties");
         assertNotNull(is);
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/0d827ee7/components/camel-core-osgi/src/test/java/org/apache/camel/core/osgi/OsgiFactoryFinderTest.java
----------------------------------------------------------------------
diff --git a/components/camel-core-osgi/src/test/java/org/apache/camel/core/osgi/OsgiFactoryFinderTest.java
b/components/camel-core-osgi/src/test/java/org/apache/camel/core/osgi/OsgiFactoryFinderTest.java
index a6197ff..f53e29e 100644
--- a/components/camel-core-osgi/src/test/java/org/apache/camel/core/osgi/OsgiFactoryFinderTest.java
+++ b/components/camel-core-osgi/src/test/java/org/apache/camel/core/osgi/OsgiFactoryFinderTest.java
@@ -26,7 +26,7 @@ public class OsgiFactoryFinderTest extends CamelOsgiTestSupport {
 
     @Test
     public void testFindClass() throws Exception {
-        OsgiFactoryFinder finder = new OsgiFactoryFinder(getBundleContext(), new DefaultClassResolver(null),
"META-INF/services/org/apache/camel/component/");
+        OsgiFactoryFinder finder = new OsgiFactoryFinder(getBundleContext(), new DefaultClassResolver(),
"META-INF/services/org/apache/camel/component/");
         Class<?> clazz = finder.findClass("file_test", "strategy.factory.");
         assertNotNull("We should get the file strategy factory here", clazz);
         

http://git-wip-us.apache.org/repos/asf/camel/blob/0d827ee7/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/CamelToDozerClassResolverAdapter.java
----------------------------------------------------------------------
diff --git a/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/CamelToDozerClassResolverAdapter.java
b/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/CamelToDozerClassResolverAdapter.java
index 611a4bb..ad913d1 100644
--- a/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/CamelToDozerClassResolverAdapter.java
+++ b/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/CamelToDozerClassResolverAdapter.java
@@ -29,7 +29,7 @@ public final class CamelToDozerClassResolverAdapter implements DozerClassLoader
 
     public CamelToDozerClassResolverAdapter() {
         // must have a default nor-arg constructor to allow Dozer to work with OSGi
-        classResolver = new DefaultClassResolver(null);
+        classResolver = new DefaultClassResolver();
     }
 
     public CamelToDozerClassResolverAdapter(CamelContext camelContext) {

http://git-wip-us.apache.org/repos/asf/camel/blob/0d827ee7/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrConverterTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrConverterTest.java
b/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrConverterTest.java
index a4ce7b4..1298e3c 100644
--- a/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrConverterTest.java
+++ b/components/camel-jcr/src/test/java/org/apache/camel/component/jcr/JcrConverterTest.java
@@ -45,7 +45,7 @@ public class JcrConverterTest extends Assert {
     @Before
     public void init() throws Exception {
         converter = new DefaultTypeConverter(new DefaultPackageScanClassResolver(),
-                new ReflectionInjector(), new DefaultFactoryFinderResolver().resolveDefaultFactoryFinder(new
DefaultClassResolver(null)));
+                new ReflectionInjector(), new DefaultFactoryFinderResolver().resolveDefaultFactoryFinder(new
DefaultClassResolver()));
         ServiceHelper.startService(converter);
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/0d827ee7/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/HttpServerSharedPipelineFactory.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/HttpServerSharedPipelineFactory.java
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/HttpServerSharedPipelineFactory.java
index 2f9eefb..f9b4cd0 100644
--- a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/HttpServerSharedPipelineFactory.java
+++ b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/HttpServerSharedPipelineFactory.java
@@ -53,7 +53,7 @@ public class HttpServerSharedPipelineFactory extends HttpServerPipelineFactory
{
         this.configuration = configuration;
         this.channelFactory = channelFactory;
         // fallback and use default resolver
-        this.classResolver = classResolver != null ? classResolver : new DefaultClassResolver(null);
+        this.classResolver = classResolver != null ? classResolver : new DefaultClassResolver();
 
         try {
             this.sslContext = createSSLContext();

http://git-wip-us.apache.org/repos/asf/camel/blob/0d827ee7/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/HttpServerSharedInitializerFactory.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/HttpServerSharedInitializerFactory.java
b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/HttpServerSharedInitializerFactory.java
index 930dc2d..3ed4397 100644
--- a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/HttpServerSharedInitializerFactory.java
+++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/HttpServerSharedInitializerFactory.java
@@ -53,7 +53,7 @@ public class HttpServerSharedInitializerFactory extends HttpServerInitializerFac
         this.configuration = configuration;
         this.channelFactory = channelFactory;
         // fallback and use default resolver
-        this.classResolver = classResolver != null ? classResolver : new DefaultClassResolver(null);
+        this.classResolver = classResolver != null ? classResolver : new DefaultClassResolver();
 
         try {
             this.sslContext = createSSLContext();

http://git-wip-us.apache.org/repos/asf/camel/blob/0d827ee7/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintHelper.java
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintHelper.java
b/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintHelper.java
index d8a1b4a..0c14be6 100644
--- a/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintHelper.java
+++ b/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintHelper.java
@@ -76,7 +76,7 @@ public final class CamelBlueprintHelper {
     public static final String BUNDLE_FILTER = "(Bundle-SymbolicName=*)";
     public static final String BUNDLE_VERSION = "1.0.0";
     private static final Logger LOG = LoggerFactory.getLogger(CamelBlueprintHelper.class);
-    private static final ClassResolver RESOLVER = new DefaultClassResolver(null);
+    private static final ClassResolver RESOLVER = new DefaultClassResolver();
 
     private CamelBlueprintHelper() {
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/0d827ee7/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/XStreamDataFormatDriverConfigTest.java
----------------------------------------------------------------------
diff --git a/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/XStreamDataFormatDriverConfigTest.java
b/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/XStreamDataFormatDriverConfigTest.java
index 6b15a73..d4777fb 100644
--- a/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/XStreamDataFormatDriverConfigTest.java
+++ b/components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/XStreamDataFormatDriverConfigTest.java
@@ -32,7 +32,7 @@ public class XStreamDataFormatDriverConfigTest extends CamelTestSupport
{
         XStreamDataFormat xStreamDataFormat = new XStreamDataFormat();
         xStreamDataFormat.setXstreamDriver(new JsonHierarchicalStreamDriver());
 
-        XStream xStream = xStreamDataFormat.createXStream(new DefaultClassResolver(context));
+        XStream xStream = xStreamDataFormat.createXStream(new DefaultClassResolver());
         String marshalledOrder = xStream.toXML(purchaseOrder);
 
         assertEquals("{", marshalledOrder.substring(0, 1));


Mime
View raw message