You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Tomas Restrepo (JIRA)" <qp...@incubator.apache.org> on 2007/05/14 21:17:16 UTC

[jira] Resolved: (QPID-485) AmqBrokerInfo.Equals method doesn't get the expected result

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

Tomas Restrepo resolved QPID-485.
---------------------------------

    Resolution: Fixed

Resolved in revision 537954

> AmqBrokerInfo.Equals method doesn't get the expected result
> -----------------------------------------------------------
>
>                 Key: QPID-485
>                 URL: https://issues.apache.org/jira/browse/QPID-485
>             Project: Qpid
>          Issue Type: Bug
>          Components: Dot Net Client
>    Affects Versions: M2
>            Reporter: Carlos Medina
>            Priority: Minor
>             Fix For: M2
>
>         Attachments: QPID-485.diff
>
>
> The AmqBrokerInfo.Equals() method have various issues..
> First issue: I get a false as result whe I use the AmqBrokerInfo.Equals() method to compare two objects like:
> AmqBrokerInfo broker = new AmqBrokerInfo("amqp", "localhost", 5672, true);
> AmqBrokerInfo broker1 = new AmqBrokerInfo("Amqp", "localhost", 5672, true);
> This is because the implementation of AmqBrokerInfo.Equals() doesn't ignore case when the Transport property is evaluated.. (see below the actual code)
> ==============
> Second issue: I get a true as result when I use the AmqBrokerInfo.Equals() method to compare two objects that use different authentication mode (SSL)
> AmqBrokerInfo broker = new AmqBrokerInfo("amqp", "localhost", 5672, true);
> AmqBrokerInfo broker1 = new AmqBrokerInfo("amqp", "localhost", 5672, false);
> =============
> Third issue: this issue is a question.. The actual code of AmqBrokerInfo.Equals() method (see below) doesn't compare options....  is it correct? or it must compare it...
> =============
> Actual code
> public override bool Equals(object obj)
> {
>         if (!(obj is IBrokerInfo))
>             return false;
>         IBrokerInfo bd = (IBrokerInfo) obj;
>         return StringEqualsIgnoreCase(_host, bd.Host) && 
>                     _port == bd.Port && 
>                    _transport == bd.Transport;
> }

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