Use modern language features in tests

This commit is contained in:
Sam Brannen
2022-02-03 15:35:32 +01:00
parent 32cd73261a
commit b3f786728e
58 changed files with 117 additions and 151 deletions

View File

@@ -61,10 +61,9 @@ public class TestSimpSubscription implements SimpSubscription {
if (this == other) {
return true;
}
if (!(other instanceof SimpSubscription)) {
if (!(other instanceof SimpSubscription otherSubscription)) {
return false;
}
SimpSubscription otherSubscription = (SimpSubscription) other;
return (ObjectUtils.nullSafeEquals(getSession(), otherSubscription.getSession()) &&
this.id.equals(otherSubscription.getId()));
}