diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/history/MessageHistory.java b/org.springframework.integration/src/main/java/org/springframework/integration/history/MessageHistory.java index 6d0830e745..294587a0c7 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/history/MessageHistory.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/history/MessageHistory.java @@ -70,6 +70,15 @@ public class MessageHistory implements Iterable, Serializab } } + public boolean equals(Object other) { + return (other instanceof MessageHistory + && this.events.equals(((MessageHistory) other).events)); + } + + public int hashCode() { + return 17 * this.events.hashCode(); + } + /** * Returns a String representation of the history event list. */ diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/support/ComponentMetadata.java b/org.springframework.integration/src/main/java/org/springframework/integration/support/ComponentMetadata.java index 2a8ed0b5d9..015ea72388 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/support/ComponentMetadata.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/support/ComponentMetadata.java @@ -103,6 +103,15 @@ public class ComponentMetadata implements Serializable { return Collections.unmodifiableMap(this.attributes); } + public boolean equals(Object other) { + return (other instanceof ComponentMetadata + && this.attributes.equals(((ComponentMetadata) other).attributes)); + } + + public int hashCode() { + return 17 * this.attributes.hashCode(); + } + public String toString() { return this.attributes.toString(); }