Updated Branches: refs/heads/camel-2.12.x 352bfc3c5 -> 630149b1a refs/heads/master 4bcf10887 -> 1099b8ce9
Avoid potential NPE Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1099b8ce Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1099b8ce Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1099b8ce Branch: refs/heads/master Commit: 1099b8ce94a928b5b111ff859793ca85168c5eab Parents: 4bcf108 Author: Claus Ibsen <[email protected]> Authored: Mon Feb 10 16:59:48 2014 +0100 Committer: Claus Ibsen <[email protected]> Committed: Mon Feb 10 16:59:48 2014 +0100 ---------------------------------------------------------------------- .../apache/camel/management/mbean/ManagedCamelContext.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/1099b8ce/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java index bfbbe88..75a4610 100644 --- a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java +++ b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java @@ -408,8 +408,12 @@ public class ManagedCamelContext extends ManagedPerformanceCounter implements Ti public String componentParameterJsonSchema(String componentName) throws Exception { Component component = context.getComponent(componentName); - ComponentConfiguration configuration = component.createComponentConfiguration(); - return configuration.createParameterJsonSchema(); + if (component != null) { + ComponentConfiguration configuration = component.createComponentConfiguration(); + return configuration.createParameterJsonSchema(); + } else { + return null; + } } public void reset(boolean includeRoutes) throws Exception {
