Details

      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).

        Gliffy Diagrams

          Activity

          Hide
          tom.elrod 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 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
          metelka 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
          metelka 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 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 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 Tom Elrod
              Reporter:
              metelka Petr Matejka
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development