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


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.

Reply via email to