Qpid
  1. Qpid
  2. QPID-3095

AMQBrokerDetails equals() and hashCode() methods do not adhere to contract

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9
    • Fix Version/s: 0.15
    • Component/s: Java Client
    • Labels:
      None

      Description

      The AMQBrokerDetails object has an equals and a hashCode implementation that are not compatible. Equality uses case-insensitive comparisons and also compares SSL status, whereas the hashCode is calculated using the provided values and does not include SSL details. The contract for hashCode is given here:

      http://download.oracle.com/javase/6/docs/api/java/lang/Object.html#hashCode%28%29

        Activity

        Hide
        Rob Godfrey added a comment -

        Can you review this trivial change please Robbie?

        Show
        Rob Godfrey added a comment - Can you review this trivial change please Robbie?
        Hide
        Robbie Gemmell added a comment -

        Looks ok to me.

        Show
        Robbie Gemmell added a comment - Looks ok to me.

          People

          • Assignee:
            Robbie Gemmell
            Reporter:
            Andrew Kennedy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development