Chia-Ping Tsai created KAFKA-12661:
--------------------------------------

             Summary: ConfigEntry#equal does not compare other fields when 
value is NOT null 
                 Key: KAFKA-12661
                 URL: https://issues.apache.org/jira/browse/KAFKA-12661
             Project: Kafka
          Issue Type: Bug
            Reporter: Chia-Ping Tsai


{code:java}
        return this.name.equals(that.name) &&
                this.value != null ? this.value.equals(that.value) : that.value 
== null &&
                this.isSensitive == that.isSensitive &&
                this.isReadOnly == that.isReadOnly &&
                this.source == that.source &&
                Objects.equals(this.synonyms, that.synonyms);
{code}

the second value of ternary operator is "that.value == null &&
                this.isSensitive == that.isSensitive &&
                this.isReadOnly == that.isReadOnly &&
                this.source == that.source &&
                Objects.equals(this.synonyms, that.synonyms);" rather than 
"that.value == null". Hence, it does not compare other fields when value is not 
null.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to