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:20:00 UTC
[jira] [Created] (KAFKA-12661) ConfigEntry#equal does not compare
other fields when value is NOT null
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)