[ 
https://issues.apache.org/jira/browse/QPID-5591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13920817#comment-13920817
 ] 

Robbie Gemmell commented on QPID-5591:
--------------------------------------

Changes look good.

{quote}
For compareTo throwing an NPE is actually the correct response
{quote}

Ah, oops :)

In that case, we should revert this in QPID-5577 / 
https://svn.apache.org/r1572343:
{noformat}
@@ -436,9 +436,13 @@ public abstract class QueueEntryImpl<E extends 
QueueEntryImpl<E,Q,L>, Q extends
     }


-    public int compareTo(final E o)
+    public int compareTo(final QueueEntry o)
     {
-        E other = o;
+        if(o == null)
+        {
+            return 1;
+        }
+        QueueEntryImpl other = (QueueEntryImpl)o;
         return getEntryId() > other.getEntryId() ? 1 : getEntryId() < 
other.getEntryId() ? -1 : 0;
     }
{noformat}

> [Java Broker] Move responsibility for setting attribute values to 
> AbstractConfiguredObject
> ------------------------------------------------------------------------------------------
>
>                 Key: QPID-5591
>                 URL: https://issues.apache.org/jira/browse/QPID-5591
>             Project: Qpid
>          Issue Type: Sub-task
>          Components: Java Broker
>            Reporter: Rob Godfrey
>            Assignee: Rob Godfrey
>             Fix For: 0.27
>
>
> Allow attributes to be defined as being automatically set... that is 
> AbstractConfiguredObject takes responsibility for setting memberVariables 
> within the subclass which represent the perceived value of the attribute.
> The "actual" value of the attribute will still be returned from the map held 
> by the AbstractConfiguredObject.  Calling getAttribute will evaluate to the 
> perceived value except where the attribute is marked as secure in which case 
> non "system" subjects will only receive an obfuscated value



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to