Details

    • Type: Bug Bug
    • Status: Closed Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: 1.4.4.GA
    • Fix Version/s: 2.0.0.CR1 (Boon)
    • Component/s: general
    • Security Level: Public (Everyone can see)
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      Description

      InvokerLocator.equals compares hash-codes of uris instead of comparing uris . The probability of hash collision is quite low except for cases when you connect to many nodes (which is my case, i'm connecting to >1000 nodes).

        Activity

        Hide
        Tom Elrod
        added a comment -

        Can you provide a test case? Or at least some locator url values I can use for testing?

        I actually thought this bug in the jdk (which did not provide unique hash code values for large strings), was fixed in jdk 1.2 (http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=1258091).

        Show
        Tom Elrod
        added a comment - Can you provide a test case? Or at least some locator url values I can use for testing? I actually thought this bug in the jdk (which did not provide unique hash code values for large strings), was fixed in jdk 1.2 ( http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=1258091 ).
        Hide
        Petr Matejka
        added a comment -

        Hashcodes are never guaranteed to be unique, even on short strings (see Object.hashcode javadoc). The two locator uris with equal hash code (case sensitive):
        "http://1.2.3.4/aaa"
        "http://1.2.3.4/abB"

        Show
        Petr Matejka
        added a comment - Hashcodes are never guaranteed to be unique, even on short strings (see Object.hashcode javadoc). The two locator uris with equal hash code (case sensitive): "http://1.2.3.4/aaa" "http://1.2.3.4/abB"
        Hide
        Tom Elrod
        added a comment -

        Changed equals() method of InvokerLocator to compare equality of locator uri characters instead of hash code of the locator uri.

        Test case: org.jboss.test.remoting.locator.InvokerLocatorTestCase

        Show
        Tom Elrod
        added a comment - Changed equals() method of InvokerLocator to compare equality of locator uri characters instead of hash code of the locator uri. Test case: org.jboss.test.remoting.locator.InvokerLocatorTestCase

          People

          • Assignee:
            Tom Elrod
            Reporter:
            Petr Matejka
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: