Reduce npath complexity of Mon.equals
This commit is contained in:
parent
1e3ffb6f2c
commit
0f93915297
1 changed files with 2 additions and 11 deletions
|
@ -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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue