Use a single expression return, trimming the resulting method
size.
Change-Id: I5300ed93cc97de9b3b60ce885b6b8a13dd0c6927
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
@Override
public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof ConstantArrayCollection)) {
- return false;
- }
-
- return Arrays.equals(array, ((ConstantArrayCollection<?>) obj).array);
+ return obj == this || obj instanceof ConstantArrayCollection
+ && Arrays.equals(array, ((ConstantArrayCollection<?>) obj).array);
}
@Override