Add equals/hashcode for STOMP Subscription
Issue: SPR-15229
This commit is contained in:
parent
5ea5f81c00
commit
f219680d42
|
@ -497,6 +497,23 @@ public class DefaultSubscriptionRegistry extends AbstractSubscriptionRegistry {
|
||||||
return this.selectorExpression;
|
return this.selectorExpression;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object other) {
|
||||||
|
if (this == other) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (other == null || getClass() != other.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return getId().equals(((Subscription) other).getId());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return getId().hashCode();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "subscription(id=" + this.id + ")";
|
return "subscription(id=" + this.id + ")";
|
||||||
|
|
Loading…
Reference in New Issue