camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [4/5] camel git commit: CAMEL-8077: Fixed potential NPE
Date Sun, 30 Nov 2014 15:23:51 GMT
CAMEL-8077: 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/ae8c483f
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ae8c483f
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ae8c483f

Branch: refs/heads/camel-2.14.x
Commit: ae8c483fe5db85734e371f0fb9002681ce0203c4
Parents: a051b1d
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sun Nov 30 16:19:38 2014 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sun Nov 30 16:23:29 2014 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/impl/DefaultCamelContext.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ae8c483f/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
index 2d1dfb8..18abf63 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
@@ -1461,7 +1461,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
 
     public synchronized RouteDefinition getRouteDefinition(String id) {
         for (RouteDefinition route : routeDefinitions) {
-            if (route.getId().equals(id)) {
+            if (route.getId() != null && route.getId().equals(id)) {
                 return route;
             }
         }


Mime
View raw message