Reduce npath complexity of Mon.equals

This commit is contained in:
Paul Campbell 2017-12-31 19:09:33 +00:00
parent 1e3ffb6f2c
commit 0f93915297

View file

@ -118,17 +118,8 @@ public class Mon<T> implements Functor<T, Mon<?>> {
* @return true if they are the same * @return true if they are the same
*/ */
@Override @Override
@SuppressWarnings("npathcomplexity")
public boolean equals(final Object o) { public boolean equals(final Object o) {
if (this == o) { return this == o || o != null && getClass() == o.getClass() && value.equals(((Mon<?>) o).value);
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
final Mon<?> mon = (Mon<?>) o;
return value.equals(mon.value);
} }
} }