You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Chia-Ping Tsai (Jira)" <ji...@apache.org> on 2021/04/13 03:24:00 UTC

[jira] [Updated] (KAFKA-12661) ConfigEntry#equal does not compare other fields when value is NOT null

     [ https://issues.apache.org/jira/browse/KAFKA-12661?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chia-Ping Tsai updated KAFKA-12661:
-----------------------------------
    Priority: Minor  (was: Major)

> 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
>            Assignee: Chia-Ping Tsai
>            Priority: Minor
>
> {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)