Claus Ibsen created CAMEL-25972:
-----------------------------------

             Summary: camel-controlbus - stats of a route that does not exist 
fails with a NullPointerException, and the body is left as it was
                 Key: CAMEL-25972
                 URL: https://issues.apache.org/jira/browse/CAMEL-25972
             Project: Camel
          Issue Type: Bug
          Components: camel-controlbus
    Affects Versions: 4.18.0, 4.22.0, 4.23.0
            Reporter: Claus Ibsen
             Fix For: 4.24.0


{{controlbus:route?routeId=...&action=stats}} for a route id that does not 
exist does not give the text "Cannot lookup route with id ..." of 
{{ControlBusProducer}} (main e6885df7894d, line 223). The route is looked up as 
null and passed to {{getObjectNameForRoute(route)}} (line 214), which throws a 
NullPointerException. The task logs it as an error that is ignored, and the 
body is left as it was.

Checked on 4.24.0-SNAPSHOT with {{camel run}}: the log has 
{{NullPointerException: Cannot invoke 
"org.apache.camel.Route.getCamelContext()" because "route" is null}}, and the 
body after the step is unchanged.

*Proposed change*: check for the route before the name of its MBean is looked 
up.

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to