NullPointerException in RoutingTableImpl.

Description

https://github.com/igniterealtime/Openfire/pull/534

In #routeToComponent, it is first checked if the component is being hosted in the local JVM. If it was not found, then all nodes in the ComponentsCache are checked to find if the component is hosted by one of those. In this process, the local routing table is again searched for the component, because it may have been added after the previous check. However, after this search, there is no null check done for the searched route. This results in an NPE when the component was not found locally and the #process(packet) method is called on the object.

This also prevents the code from searching other nodes that may have been in the nodes set. Added a null check to prevent this scenario.

Environment

None

Activity

Show:
Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created February 10, 2016 at 2:08 PM
Updated October 3, 2016 at 7:36 PM
Resolved October 3, 2016 at 7:36 PM