diff --git a/src/main/java/net/kemitix/mon/Mon.java b/src/main/java/net/kemitix/mon/Mon.java index b591044..11bf8e6 100644 --- a/src/main/java/net/kemitix/mon/Mon.java +++ b/src/main/java/net/kemitix/mon/Mon.java @@ -118,17 +118,8 @@ public class Mon implements Functor> { * @return true if they are the same */ @Override - @SuppressWarnings("npathcomplexity") public boolean equals(final Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - - final Mon mon = (Mon) o; - - return value.equals(mon.value); + return this == o || o != null && getClass() == o.getClass() && value.equals(((Mon) o).value); } + }