diff --git a/src/main/java/io/jenkins/plugins/util/RemoteResultWrapper.java b/src/main/java/io/jenkins/plugins/util/RemoteResultWrapper.java index 112cf6d..e7f61f0 100644 --- a/src/main/java/io/jenkins/plugins/util/RemoteResultWrapper.java +++ b/src/main/java/io/jenkins/plugins/util/RemoteResultWrapper.java @@ -1,6 +1,7 @@ package io.jenkins.plugins.util; import java.io.Serializable; +import java.util.Objects; import edu.hm.hafner.util.FilteredLog; @@ -34,4 +35,28 @@ public RemoteResultWrapper(final T result, final String title) { public T getResult() { return result; } + + @Override + public boolean equals(final Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + if (!super.equals(o)) { + return false; + } + + RemoteResultWrapper that = (RemoteResultWrapper) o; + + return Objects.equals(result, that.result); + } + + @Override + public int hashCode() { + int result1 = super.hashCode(); + result1 = 31 * result1 + (result != null ? result.hashCode() : 0); + return result1; + } }