diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java b/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java index d8ef51a2f..30bcc759c 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java @@ -440,6 +440,24 @@ public class EchoProperties extends Task { Tuple that = (Tuple) o; return key.compareTo(that.key); } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o == null || o.getClass() != getClass()) { + return false; + } + Tuple that = (Tuple) o; + return (key == null ? that.key == null : key.equals(that.key)) + && (value == null ? that.value == null : value.equals(that.value)); + } + + @Override + public int hashCode() { + return key != null ? key.hashCode() : 0; + } } private List sortProperties(Properties props) {