Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-12661

ConfigEntry#equal does not compare other fields when value is NOT null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.0.0
    • None
    • None

    Description

              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);
      

      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.

      Attachments

        Issue Links

          Activity

            People

              chia7712 Chia-Ping Tsai
              chia7712 Chia-Ping Tsai
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: