diff --git a/equalsverifier-core/src/main/java/nl/jqno/equalsverifier/internal/testhelpers/TestValueProviders.java b/equalsverifier-core/src/main/java/nl/jqno/equalsverifier/internal/testhelpers/TestValueProviders.java index 915790688..3e971ef63 100644 --- a/equalsverifier-core/src/main/java/nl/jqno/equalsverifier/internal/testhelpers/TestValueProviders.java +++ b/equalsverifier-core/src/main/java/nl/jqno/equalsverifier/internal/testhelpers/TestValueProviders.java @@ -1,20 +1,12 @@ package nl.jqno.equalsverifier.internal.testhelpers; -import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.Optional; import nl.jqno.equalsverifier.internal.reflection.Tuple; import nl.jqno.equalsverifier.internal.reflection.TypeTag; import nl.jqno.equalsverifier.internal.reflection.instantiation.ValueProvider; -@SuppressFBWarnings( - value = "DM_STRING_CTOR", - justification = "We really do need a separate instances with the same value" -) public final class TestValueProviders { - public static final Tuple INTS = Tuple.of(42, 1337, 42); - public static final Tuple STRINGS = Tuple.of("abc", "xyz", new String("abc")); - private TestValueProviders() {} public static ValueProvider empty() { @@ -25,23 +17,4 @@ public Optional> provide(TypeTag tag, Attributes attributes) { } }; } - - public static ValueProvider simple() { - return new ValueProvider() { - @SuppressWarnings("unchecked") - @Override - public Optional> provide(TypeTag tag, Attributes attributes) { - if (tag.getType().equals(int.class)) { - return Optional.of((Tuple) INTS); - } - if (tag.getType().equals(Integer.class)) { - return Optional.of((Tuple) INTS); - } - if (tag.getType().equals(String.class)) { - return Optional.of((Tuple) STRINGS); - } - return Optional.empty(); - } - }; - } }