You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Justin Bertram (JIRA)" <ji...@apache.org> on 2018/01/04 20:23:00 UTC

[jira] [Resolved] (ARTEMIS-1524) ActiveMQServerControl.listAddresses() can fail with NullPointerException

     [ https://issues.apache.org/jira/browse/ARTEMIS-1524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Bertram resolved ARTEMIS-1524.
-------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.5.0

> 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
>             Fix For: 2.5.0
>
>
> 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 ActiveMQServerControl.listAddresses() retrieves the list of addresses and then retrieves the detail of each one to build the Json representation. If the ActiveMQServerControl.deleteAddress() is invoked after getting the list of addresses but before retrieving the details - a NullPointerException is thrown.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)