From 642e9043c06ccc8869ebefc67f7faf000115f849 Mon Sep 17 00:00:00 2001 From: Jan Ouwens Date: Wed, 4 Dec 2024 19:59:01 +0100 Subject: [PATCH] Removes unnecessary complication --- .../factories/FallbackFactory.java | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/equalsverifier-core/src/main/java/nl/jqno/equalsverifier/internal/reflection/vintage/prefabvalues/factories/FallbackFactory.java b/equalsverifier-core/src/main/java/nl/jqno/equalsverifier/internal/reflection/vintage/prefabvalues/factories/FallbackFactory.java index eb69ea6b3..e74a21580 100644 --- a/equalsverifier-core/src/main/java/nl/jqno/equalsverifier/internal/reflection/vintage/prefabvalues/factories/FallbackFactory.java +++ b/equalsverifier-core/src/main/java/nl/jqno/equalsverifier/internal/reflection/vintage/prefabvalues/factories/FallbackFactory.java @@ -1,10 +1,7 @@ package nl.jqno.equalsverifier.internal.reflection.vintage.prefabvalues.factories; import java.lang.reflect.Array; -import java.lang.reflect.Field; import java.util.LinkedHashSet; -import nl.jqno.equalsverifier.internal.reflection.FieldIterable; -import nl.jqno.equalsverifier.internal.reflection.FieldProbe; import nl.jqno.equalsverifier.internal.reflection.Tuple; import nl.jqno.equalsverifier.internal.reflection.TypeTag; import nl.jqno.equalsverifier.internal.reflection.instantiation.VintageValueProvider; @@ -43,7 +40,6 @@ public Tuple createValues( return giveArrayInstances(tag, valueProvider, clone); } - traverseFields(tag, valueProvider, clone); return giveInstances(tag, valueProvider, clone); } @@ -82,21 +78,6 @@ private Tuple giveArrayInstances( return new Tuple<>(red, blue, redCopy); } - private void traverseFields( - TypeTag tag, - VintageValueProvider valueProvider, - LinkedHashSet typeStack - ) { - Class type = tag.getType(); - for (Field field : FieldIterable.of(type)) { - FieldProbe probe = FieldProbe.of(field); - boolean isStaticAndFinal = probe.isStatic() && probe.isFinal(); - if (!isStaticAndFinal) { - valueProvider.realizeCacheFor(TypeTag.of(field, tag), typeStack); - } - } - } - private Tuple giveInstances( TypeTag tag, VintageValueProvider valueProvider,