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

Robert Gemmell updated QPID-1128:
---------------------------------

    Attachment: QPID-1128_23nov2008.patch

This issue occurs because the queue items are stored in a map created in the 
abstract MBeanTypeTabControl class by a method within the QueueTypeTabControl 
subclass, using a key consisting of their name and the queue depth. The first 
issue is that this results in the sort by name list also having the items queue 
depths, and the second is that it results in an NPE when attempting to add 
queues when they are sorted by consumer count. This occurs because the items 
are then requested back from the map by a method in MBeanTypeTabControl with a 
key which now consists of their name and consumer count due to the resorting 
altering the displayed list items which are utilised as keys, and this results 
in it returning null.

The attached patch QPID-1128_23nov2008.patch corrects this issue by altering 
the QueueTypeTabControl class to use only the queue name when inserting the 
queues into the map, and to display the appropriate data (name only, name + 
queue depth, or name + consumer count) in the selection list. Additionally it 
modifies MBeanTypeTabControl to ensure it utilises only the name from the keys 
passed to its method which adds to the navigation by having it strip everything 
from the first occurance of the string " (", which only occurs after the name.

> NPE displayed when adding queue to navigation
> ---------------------------------------------
>
>                 Key: QPID-1128
>                 URL: https://issues.apache.org/jira/browse/QPID-1128
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Management : JMX Console
>    Affects Versions: M2, M2.1
>            Reporter: Martin Ritchie
>            Assignee: Martin Ritchie
>         Attachments: QPID-1128_23nov2008.patch
>
>
> Summary:
> If you sort the queues on a Virtualhost by 'Consumer count' and then proceed 
> to '<- Add to Navigation' then it will fail and a box stating 'Manged Object 
> is null : NPE' will be displayed.
> Workaround:
> Ensure that 'Consumer count' is not the chosen 'Sort by' value.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to