You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Pat Fox (JIRA)" <ji...@apache.org> on 2017/11/25 14:46:01 UTC
[jira] [Created] (ARTEMIS-1524)
ActiveMQServerControl.listAddresses() can fail with NullPointerException
Pat Fox created ARTEMIS-1524:
--------------------------------
Summary: ActiveMQServerControl.listAddresses() can fail with NullPointerException
Key: ARTEMIS-1524
URL: https://issues.apache.org/jira/browse/ARTEMIS-1524
Project: ActiveMQ Artemis
Issue Type: Bug
Components: Broker
Affects Versions: 2.4.0
Reporter: Pat Fox
Priority: Minor
race condition between ActiveMQServerControl.listAddresses() and ActiveMQServerControl.deleteAddress() that can result in the following NullPointerException
{code}
java.lang.NullPointerException: null
at org.apache.activemq.artemis.core.management.impl.view.AddressView.toJson(Unknown Source)
at org.apache.activemq.artemis.core.management.impl.view.AddressView.toJson(Unknown Source)
at org.apache.activemq.artemis.core.management.impl.view.ActiveMQAbstractView.getResultsAsJson(ActiveMQAbstractView.java:68)
at org.apache.activemq.artemis.core.management.impl.ActiveMQServerControlImpl.listAddresses(ActiveMQServerControlImpl.java:1743)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
{code}
The listAddresses() retrieves the list of addresses and then retrieves the detail of each one to build the Json representation. If the deleteAddress() happens between getting the list and retrieving the details - a NullPointerException is thrown.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)