Skip to content

Commit

Permalink
Remove equals.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed May 11, 2023
1 parent fe644d9 commit fca1498
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
18 changes: 0 additions & 18 deletions src/main/java/io/jenkins/plugins/util/RemoteResultWrapper.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.jenkins.plugins.util;

import java.io.Serializable;
import java.util.Objects;

import edu.hm.hafner.util.FilteredLog;

Expand Down Expand Up @@ -35,21 +34,4 @@ 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;
}
RemoteResultWrapper<?> that = (RemoteResultWrapper<?>) o;
return Objects.equals(result, that.result);
}

@Override
public int hashCode() {
return Objects.hash(result);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import org.junit.jupiter.api.Test;

import nl.jqno.equalsverifier.EqualsVerifier;

import static org.assertj.core.api.Assertions.*;

class RemoteResultWrapperTest {
Expand All @@ -18,9 +16,4 @@ void shouldCreateWrapper() {
wrapper.logInfo("Hello %s", "World");
assertThat(wrapper.getInfoMessages()).containsExactly("Hello World");
}

@Test
void shouldAdhereToEquals() {
EqualsVerifier.forClass(RemoteResultWrapper.class).withRedefinedSuperclass().verify();
}
}

0 comments on commit fca1498

Please sign in to comment.