Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
linenumberstrue
private final String value; => private final Optional<String> value;



@Override
public boolean equals(Object o) {
    if (this == o)
        return true;
    if (o == null || getClass() != o.getClass())
        return false;

    ConfigEntry that = (ConfigEntry) o;

    return this.name.equals(that.name) &&
            this.value.equals(that.value) &&               // CHANGED  
            this.isSensitive == that.isSensitive &&
            this.isReadOnly == that.isReadOnly &&
            this.source == that.source &&
            Objects.equals(this.synonyms, that.synonyms);
}

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + name.hashCode();
    result = prime * result + value.hashCode();            // CHANGED
    result = prime * result + (isSensitive ? 1 : 0);
    result = prime * result + (isReadOnly ? 1 : 0);
    result = prime * result + source.hashCode();
    result = prime * result + synonyms.hashCode();
    return result;
}

...