qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlos Medina (JIRA)" <qpid-...@incubator.apache.org>
Subject [jira] Created: (QPID-485) AmqBrokerInfo.Equals method doesn't get the expected result
Date Wed, 09 May 2007 19:43:15 GMT
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.


Mime
View raw message