Updated Branches:
  refs/heads/master f57c78f10 -> 2fe5d2aca

Fixed potential NPE


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

Branch: refs/heads/master
Commit: 2fe5d2acaf9f3d1b1c91001007645364f6dbfd90
Parents: f57c78f
Author: Claus Ibsen <davscl...@apache.org>
Authored: Fri Jun 7 18:00:31 2013 +0200
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Fri Jun 7 18:10:56 2013 +0200

----------------------------------------------------------------------
 .../org/apache/camel/util/CamelContextHelper.java  |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/2fe5d2ac/camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java
----------------------------------------------------------------------
diff --git 
a/camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java 
b/camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java
index 8e593d8..03b5422 100644
--- a/camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java
+++ b/camel-core/src/main/java/org/apache/camel/util/CamelContextHelper.java
@@ -356,7 +356,7 @@ public final class CamelContextHelper {
     public static SortedMap<String, Properties> findComponents(CamelContext 
camelContext) throws LoadPropertiesException {
         SortedMap<String, Properties> map = new TreeMap<String, Properties>();
         Enumeration<URL> iter = 
camelContext.getClassResolver().loadResourcesAsURL(COMPONENT_DESCRIPTOR);
-        while (iter.hasMoreElements()) {
+        while (iter != null && iter.hasMoreElements()) {
             URL url = iter.nextElement();
             try {
                 Properties properties = new Properties();

Reply via email to