Joel Shepherd created CASSANDRA-21238:
-----------------------------------------

             Summary: Inconsistent parameters instantiation for 
ParameterizedClass
                 Key: CASSANDRA-21238
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-21238
             Project: Apache Cassandra
          Issue Type: Bug
          Components: Legacy/Core
            Reporter: Joel Shepherd


Here is a partial repro. Consider two ways of declaring an authenticator in 
cassandra.yaml:
authenticator: PasswordAuthenticator

   ... and ...

authenticator:
  - class_name: PasswordAuthenticator

Both will result in the successful instantiation of a PasswordAuthenticator, 
however the ParameterizedClass instances have different internal state. In the 
first form, the ParameterizedClass {{parameters}} member is an empty map. In 
the second form, it is {{{}null{}}}. This causes ParameterizedClass' 
{{equals()}} and {{hashCode()}} methods to exhibit inconsistent behavior.

ParameterizedClass.{color:#172b4d}newInstance() forces a null {{parameters}} to 
an empty map, so most likely equals(), hashCode() and toString() should do the 
same since newInstance() will create an instance of the class identically in 
both cases.{color}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to