You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2013/06/07 18:11:05 UTC

git commit: Fixed potential NPE

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 <da...@apache.org>
Authored: Fri Jun 7 18:00:31 2013 +0200
Committer: Claus Ibsen <da...@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();