[
https://issues.apache.org/jira/browse/QPID-3769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13605172#comment-13605172
]
Rajith Attapattu commented on QPID-3769:
----------------------------------------
I discussed this with Rafi a fair bit before arriving at a solution.
I don't think comparing the subject is the right approach for every situation.
Comparing the subjects might make sense for Topics, but not for Queues. Also at
the time equals is called we may not know the 'type'. We could look at the
resolved property to determine this. Otherwise what are we going to do ?
What should we do for exchanges with more complicated routing algorithms like
Headers or XML exchange where the subject is not a factor at all ? It gets
complicated real soon when you look beyond the simple cases.
If you look at it from a high level pov, we send messages to either a Queue or
an Exchange. They are the "destinations". So one could argue that if you are
sending to the same "exchange" then you are sending to the same destination. I
think that has a stronger argument that than what you are suggesting.
How messages are matched onto queues is a function of the exchange. And it's
something that we should not try to factor into our equals implementation.
> NPE in client AMQDestination.equals()
> -------------------------------------
>
> Key: QPID-3769
> URL: https://issues.apache.org/jira/browse/QPID-3769
> Project: Qpid
> Issue Type: Bug
> Components: Java Client
> Affects Versions: 0.12
> Reporter: Jan Bareš
> Assignee: Rajith Attapattu
> Labels: addressing
>
> Code of org.apache.qpid.client.AMQDestination.equals(Object) is buggy, it
> should test for null on _exchangeClass and _exchangeName before dereferencing
> them, lines 522 and 526.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]