camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1156110 - in /camel/branches/camel-2.8.x: ./ camel-core/src/main/java/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.java
Date Wed, 10 Aug 2011 11:33:06 GMT
Author: ningjiang
Date: Wed Aug 10 11:33:06 2011
New Revision: 1156110

URL: http://svn.apache.org/viewvc?rev=1156110&view=rev
Log:
Merged revisions 1156108 via svnmerge from 
https://svn.apache.org/repos/asf/camel/trunk

........
  r1156108 | ningjiang | 2011-08-10 19:24:46 +0800 (Wed, 10 Aug 2011) | 1 line
  
  CAMEL-4322 Fixed the issue of AnnotationTypeConverterLoader doesn't try all the classloaders
to load the converter class
........

Modified:
    camel/branches/camel-2.8.x/   (props changed)
    camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.java

Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Aug 10 11:33:06 2011
@@ -1 +1 @@
-/camel/trunk:1155230
+/camel/trunk:1155230,1156108

Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Aug 10 11:33:06 2011
@@ -1 +1 @@
-/camel/trunk:1-1148091,1149488,1153146,1153323,1155229-1155231,1155233-1155276,1155278-1155291,1155293-1155318,1155320-1155327
+/camel/trunk:1-1148091,1149488,1153146,1153323,1155229-1155231,1155233-1155276,1155278-1155291,1155293-1155318,1155320-1155327,1156108

Modified: camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.java?rev=1156110&r1=1156109&r2=1156110&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.java
(original)
+++ camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.java
Wed Aug 10 11:33:06 2011
@@ -161,18 +161,22 @@ public class AnnotationTypeConverterLoad
         for (String name : packageNames) {
             // must be a FQN class name by having an upper case letter
             if (StringHelper.hasUpperCase(name)) {
+                Class<?> clazz = null;
                 for (ClassLoader loader : resolver.getClassLoaders()) {
                     try {
-                        Class<?> clazz = loader.loadClass(name);
+                        clazz = loader.loadClass(name);
                         LOG.trace("Loaded {} as class {}", name, clazz);
                         classes.add(clazz);
                         // class founder, so no need to load it with another class loader
                         break;
                     } catch (Throwable e) {
-                        // ignore as its not a class (will be package scan afterwards)
-                        packages.add(name);
+                        // do nothing here
                     }
                 }
+                if (clazz == null) {
+                    // ignore as its not a class (will be package scan afterwards)
+                    packages.add(name);
+                }
             } else {
                 // ignore as its not a class (will be package scan afterwards)
                 packages.add(name);



Mime
View raw message