1 Reply Latest reply on May 25, 2011 8:33 AM by Andy Taylor

    Issues with "Pair"

    borges Novice

      Two issues with Pair:

       

      1. FYI: it is broken; It caches the result of hashCode() but its fields are public and non-final.

       

      2. it is part of our public API. There is a single use of it in "org.hornetq.api.core.client.ClusterTopologyListener". In the interest of keeping our public API as small as possible, I would like to change ClusterTopologyListener to simply take two arguments instead of a Pair.

       

      I mean, should we have another public API class just to save one argument from one method call?

       

      Comments?

        • 1. Re: Issues with "Pair"
          Andy Taylor Master

          1. FYI: it is broken; It caches the result of hashCode() but its fields are public and non-final.

          yeah that needs fixing

          2. it is part of our public API. There is a single use of it in "org.hornetq.api.core.client.ClusterTopologyListener". In the interest of keeping our public API as small as possible, I would like to change ClusterTopologyListener to simply take two arguments instead of a Pair.

          Im fine with that, but maybe only in trunk, there might be integration code in eap that uses this