diff --git a/src/test/java/org/springframework/data/aot/sample/ConfigWithCustomRepositoryBaseClass.java b/src/test/java/org/springframework/data/aot/sample/ConfigWithCustomRepositoryBaseClass.java index 03274cca8..64dee07e2 100644 --- a/src/test/java/org/springframework/data/aot/sample/ConfigWithCustomRepositoryBaseClass.java +++ b/src/test/java/org/springframework/data/aot/sample/ConfigWithCustomRepositoryBaseClass.java @@ -15,7 +15,7 @@ */ package org.springframework.data.aot.sample; -import lombok.experimental.Delegate; +import java.util.Optional; import org.springframework.context.annotation.ComponentScan.Filter; import org.springframework.context.annotation.Configuration; @@ -38,7 +38,55 @@ public class ConfigWithCustomRepositoryBaseClass { public static class RepoBaseClass implements CrudRepository { - private @Delegate CrudRepository delegate; + private CrudRepository delegate; + + public S save(S entity) { + return this.delegate.save(entity); + } + + public Iterable saveAll(Iterable entities) { + return this.delegate.saveAll(entities); + } + + public Optional findById(ID id) { + return this.delegate.findById(id); + } + + public boolean existsById(ID id) { + return this.delegate.existsById(id); + } + + public Iterable findAll() { + return this.delegate.findAll(); + } + + public Iterable findAllById(Iterable ids) { + return this.delegate.findAllById(ids); + } + + public long count() { + return this.delegate.count(); + } + + public void deleteById(ID id) { + this.delegate.deleteById(id); + } + + public void delete(T entity) { + this.delegate.delete(entity); + } + + public void deleteAllById(Iterable ids) { + this.delegate.deleteAllById(ids); + } + + public void deleteAll(Iterable entities) { + this.delegate.deleteAll(entities); + } + + public void deleteAll() { + this.delegate.deleteAll(); + } } public static class Person { diff --git a/src/test/java/org/springframework/data/aot/sample/QConfigWithQuerydslPredicateExecutor_Person.java b/src/test/java/org/springframework/data/aot/sample/QConfigWithQuerydslPredicateExecutor_Person.java index 09bc9bc40..0bf708670 100644 --- a/src/test/java/org/springframework/data/aot/sample/QConfigWithQuerydslPredicateExecutor_Person.java +++ b/src/test/java/org/springframework/data/aot/sample/QConfigWithQuerydslPredicateExecutor_Person.java @@ -15,9 +15,10 @@ */ package org.springframework.data.aot.sample; -import com.querydsl.core.types.dsl.EntityPathBase; import org.springframework.data.aot.sample.ConfigWithQuerydslPredicateExecutor.Person; +import com.querydsl.core.types.dsl.EntityPathBase; + public class QConfigWithQuerydslPredicateExecutor_Person extends EntityPathBase { public QConfigWithQuerydslPredicateExecutor_Person(Class type, String variable) { diff --git a/src/test/java/org/springframework/data/aot/sample/ReactiveConfig.java b/src/test/java/org/springframework/data/aot/sample/ReactiveConfig.java index af0944b6c..b5dbdf032 100644 --- a/src/test/java/org/springframework/data/aot/sample/ReactiveConfig.java +++ b/src/test/java/org/springframework/data/aot/sample/ReactiveConfig.java @@ -19,7 +19,6 @@ import org.springframework.context.annotation.ComponentScan.Filter; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.FilterType; import org.springframework.data.repository.config.EnableReactiveRepositories; -import org.springframework.data.repository.config.EnableRepositories; import org.springframework.data.repository.reactive.ReactiveCrudRepository; /** diff --git a/src/test/java/org/springframework/data/auditing/ReactiveAuditingHandlerUnitTests.java b/src/test/java/org/springframework/data/auditing/ReactiveAuditingHandlerUnitTests.java index 5364aff27..b27f1d09e 100755 --- a/src/test/java/org/springframework/data/auditing/ReactiveAuditingHandlerUnitTests.java +++ b/src/test/java/org/springframework/data/auditing/ReactiveAuditingHandlerUnitTests.java @@ -18,7 +18,6 @@ package org.springframework.data.auditing; import static org.assertj.core.api.Assertions.*; import static org.mockito.Mockito.*; -import lombok.Value; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -68,14 +67,14 @@ class ReactiveAuditingHandlerUnitTests { handler.markCreated(immutable).as(StepVerifier::create).consumeNextWith(actual -> { - assertThat(actual.getCreatedDate()).isNotNull(); - assertThat(actual.getModifiedDate()).isNotNull(); + assertThat(actual.createdDate()).isNotNull(); + assertThat(actual.modifiedDate()).isNotNull(); - assertThat(actual.getCreatedBy()).isNull(); - assertThat(actual.getModifiedBy()).isNull(); + assertThat(actual.createdBy()).isNull(); + assertThat(actual.modifiedBy()).isNull(); }).verifyComplete(); - assertThat(immutable.getCreatedDate()).isNull(); + assertThat(immutable.createdDate()).isNull(); } @Test // DATACMNS-1231 @@ -96,12 +95,8 @@ class ReactiveAuditingHandlerUnitTests { verify(auditorAware).getCurrentAuditor(); } - @Value - static class Immutable { + record Immutable(@CreatedDate Instant createdDate, @CreatedBy String createdBy, + @LastModifiedDate Instant modifiedDate, @LastModifiedBy String modifiedBy) { - @CreatedDate Instant createdDate; - @CreatedBy String createdBy; - @LastModifiedDate Instant modifiedDate; - @LastModifiedBy String modifiedBy; } } diff --git a/src/test/java/org/springframework/data/domain/SortUnitTests.java b/src/test/java/org/springframework/data/domain/SortUnitTests.java index 2f5c9d61e..0e0abc345 100755 --- a/src/test/java/org/springframework/data/domain/SortUnitTests.java +++ b/src/test/java/org/springframework/data/domain/SortUnitTests.java @@ -18,8 +18,6 @@ package org.springframework.data.domain; import static org.assertj.core.api.Assertions.*; import static org.springframework.data.domain.Sort.NullHandling.*; -import lombok.Getter; - import java.util.Collection; import org.junit.jupiter.api.Test; @@ -216,14 +214,24 @@ class SortUnitTests { } - @Getter static class Sample { Nested nested; Collection nesteds; + + public Nested getNested() { + return nested; + } + + public Collection getNesteds() { + return nesteds; + } } - @Getter static class Nested { String firstname; + + public String getFirstname() { + return firstname; + } } } diff --git a/src/test/java/org/springframework/data/mapping/InstantiationAwarePersistentPropertyAccessorUnitTests.java b/src/test/java/org/springframework/data/mapping/InstantiationAwarePersistentPropertyAccessorUnitTests.java index 9a28c81a9..d22deca12 100644 --- a/src/test/java/org/springframework/data/mapping/InstantiationAwarePersistentPropertyAccessorUnitTests.java +++ b/src/test/java/org/springframework/data/mapping/InstantiationAwarePersistentPropertyAccessorUnitTests.java @@ -17,10 +17,7 @@ package org.springframework.data.mapping; import static org.assertj.core.api.Assertions.*; -import lombok.Value; - import org.junit.jupiter.api.Test; - import org.springframework.data.mapping.context.SampleMappingContext; import org.springframework.data.mapping.context.SamplePersistentProperty; import org.springframework.data.mapping.model.EntityInstantiators; @@ -91,11 +88,8 @@ class InstantiationAwarePersistentPropertyAccessorUnitTests { assertThat(wrapper.getBean()).isEqualTo(new WithSingleArgConstructor(41L, "Oliver August")); } - @Value - static class Sample { + record Sample(String firstname, String lastname, int age) { - String firstname, lastname; - int age; } public record WithSingleArgConstructor(Long id, String name) { diff --git a/src/test/java/org/springframework/data/mapping/PersistentPropertyAccessorUnitTests.java b/src/test/java/org/springframework/data/mapping/PersistentPropertyAccessorUnitTests.java index f08e5d930..d02183e2c 100644 --- a/src/test/java/org/springframework/data/mapping/PersistentPropertyAccessorUnitTests.java +++ b/src/test/java/org/springframework/data/mapping/PersistentPropertyAccessorUnitTests.java @@ -17,12 +17,6 @@ package org.springframework.data.mapping; import static org.assertj.core.api.Assertions.*; -import lombok.AccessLevel; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.Value; -import lombok.With; - import org.junit.jupiter.api.Test; import org.springframework.core.convert.support.DefaultConversionService; import org.springframework.data.mapping.context.SampleMappingContext; @@ -53,39 +47,66 @@ public class PersistentPropertyAccessorUnitTests { var order = new Order(new Customer("1")); var accessor = context.getPersistentEntity(Order.class).getPropertyAccessor(order); - var convertingAccessor = new ConvertingPropertyAccessor(accessor, - new DefaultConversionService()); + var convertingAccessor = new ConvertingPropertyAccessor(accessor, new DefaultConversionService()); - var path = context.getPersistentPropertyPath("customer.firstname", - Order.class); + var path = context.getPersistentPropertyPath("customer.firstname", Order.class); convertingAccessor.setProperty(path, 2); - assertThat(convertingAccessor.getBean().getCustomer().getFirstname()).isEqualTo("2"); + assertThat(convertingAccessor.getBean().customer().getFirstname()).isEqualTo("2"); } - @Value - static class Order { - Customer customer; + record Order(Customer customer) { } - @Data - @AllArgsConstructor static class Customer { String firstname; + + public Customer(String firstname) { + this.firstname = firstname; + } + + public String getFirstname() { + return this.firstname; + } + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + } // DATACMNS-1322 - @Value - @With(AccessLevel.PACKAGE) - static class NestedImmutable { - String value; + static final class NestedImmutable { + private final String value; + + public NestedImmutable(String value) { + this.value = value; + } + + public String getValue() { + return this.value; + } + + NestedImmutable withValue(String value) { + return this.value == value ? this : new NestedImmutable(value); + } } - @Value - @With(AccessLevel.PACKAGE) - static class Outer { - NestedImmutable immutable; + static final class Outer { + private final NestedImmutable immutable; + + public Outer(NestedImmutable immutable) { + this.immutable = immutable; + } + + public NestedImmutable getImmutable() { + return this.immutable; + } + + Outer withImmutable(NestedImmutable immutable) { + return this.immutable == immutable ? this : new Outer(immutable); + } } } diff --git a/src/test/java/org/springframework/data/mapping/context/AbstractMappingContextUnitTests.java b/src/test/java/org/springframework/data/mapping/context/AbstractMappingContextUnitTests.java index 8ec071f1a..f34a8f765 100755 --- a/src/test/java/org/springframework/data/mapping/context/AbstractMappingContextUnitTests.java +++ b/src/test/java/org/springframework/data/mapping/context/AbstractMappingContextUnitTests.java @@ -20,10 +20,6 @@ import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.*; import groovy.lang.MetaClass; -import lombok.AccessLevel; -import lombok.EqualsAndHashCode; -import lombok.RequiredArgsConstructor; -import lombok.Value; import java.time.LocalDateTime; import java.util.ArrayList; @@ -38,7 +34,6 @@ import java.util.function.Supplier; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; - import org.springframework.aop.SpringProxy; import org.springframework.aop.framework.Advised; import org.springframework.context.ApplicationContext; @@ -156,8 +151,7 @@ class AbstractMappingContextUnitTests { var context = new SampleMappingContext(); context.getPersistentEntity(TypeInformation.MAP); - var iterator = context.getPersistentEntities() - .iterator(); + var iterator = context.getPersistentEntities().iterator(); while (iterator.hasNext()) { context.getPersistentEntity(TypeInformation.SET); @@ -216,8 +210,7 @@ class AbstractMappingContextUnitTests { @Test // DATACMNS-1574 void cleansUpCacheForRuntimeException() { - var context = TypeRejectingMappingContext.rejecting(() -> new RuntimeException(), - Unsupported.class); + var context = TypeRejectingMappingContext.rejecting(() -> new RuntimeException(), Unsupported.class); assertThatExceptionOfType(RuntimeException.class) // .isThrownBy(() -> context.getPersistentEntity(Unsupported.class)); @@ -231,8 +224,7 @@ class AbstractMappingContextUnitTests { @Test // GH-3113 void shouldIgnoreKotlinOverrideCtorPropertyInSuperClass() { - var entity = context - .getPersistentEntity(TypeInformation.of(ShadowingPropertyTypeWithCtor.class)); + var entity = context.getPersistentEntity(TypeInformation.of(ShadowingPropertyTypeWithCtor.class)); entity.doWithProperties((PropertyHandler) property -> { assertThat(property.getField().getDeclaringClass()).isIn(ShadowingPropertyTypeWithCtor.class, ShadowedPropertyTypeWithCtor.class); @@ -242,8 +234,7 @@ class AbstractMappingContextUnitTests { @Test // GH-3113 void shouldIncludeAssignableKotlinOverridePropertyInSuperClass() { - var entity = context - .getPersistentEntity(TypeInformation.of(ShadowingPropertyType.class)); + var entity = context.getPersistentEntity(TypeInformation.of(ShadowingPropertyType.class)); entity.doWithProperties((PropertyHandler) property -> { assertThat(property.getField().getDeclaringClass()).isIn(ShadowedPropertyType.class, ShadowingPropertyType.class); }); @@ -252,8 +243,7 @@ class AbstractMappingContextUnitTests { @Test // GH-3113 void shouldIncludeAssignableShadowedPropertyInSuperClass() { - var entity = context - .getPersistentEntity(TypeInformation.of(ShadowingPropertyAssignable.class)); + var entity = context.getPersistentEntity(TypeInformation.of(ShadowingPropertyAssignable.class)); assertThat(StreamUtils.createStreamFromIterator(entity.iterator()) .filter(it -> it.getField().getDeclaringClass().equals(ShadowedPropertyAssignable.class)).findFirst() // @@ -270,8 +260,7 @@ class AbstractMappingContextUnitTests { @Test // GH-3113 void shouldIgnoreNonAssignableOverridePropertyInSuperClass() { - var entity = context - .getPersistentEntity(TypeInformation.of(ShadowingPropertyNotAssignable.class)); + var entity = context.getPersistentEntity(TypeInformation.of(ShadowingPropertyNotAssignable.class)); entity.doWithProperties((PropertyHandler) property -> { assertThat(property.getField().getDeclaringClass()).isEqualTo(ShadowingPropertyNotAssignable.class); }); @@ -292,8 +281,7 @@ class AbstractMappingContextUnitTests { context.getPersistentEntity(WithNestedLists.class); - assertThat(context.getPersistentEntities()).map(it -> (Class) it.getType()) - .contains(Base.class) + assertThat(context.getPersistentEntities()).map(it -> (Class) it.getType()).contains(Base.class) .doesNotContain(List.class, ArrayList.class); } @@ -410,14 +398,17 @@ class AbstractMappingContextUnitTests { * * @author Oliver Drotbohm */ - @Value - @EqualsAndHashCode(callSuper = false) - @RequiredArgsConstructor(access = AccessLevel.PRIVATE) private static class TypeRejectingMappingContext extends SampleMappingContext { Supplier exception; Collection> rejectedTypes; + public TypeRejectingMappingContext(Supplier exception, + Collection> rejectedTypes) { + this.exception = exception; + this.rejectedTypes = rejectedTypes; + } + /** * Creates a new {@link TypeRejectingMappingContext} producing the given exceptions if any of the given types is * encountered. diff --git a/src/test/java/org/springframework/data/mapping/context/EntityProjectionIntrospectorUnitTests.java b/src/test/java/org/springframework/data/mapping/context/EntityProjectionIntrospectorUnitTests.java index 8c22ba8f8..456a3fad3 100644 --- a/src/test/java/org/springframework/data/mapping/context/EntityProjectionIntrospectorUnitTests.java +++ b/src/test/java/org/springframework/data/mapping/context/EntityProjectionIntrospectorUnitTests.java @@ -17,15 +17,11 @@ package org.springframework.data.mapping.context; import static org.assertj.core.api.Assertions.*; -import lombok.Getter; -import lombok.Value; - import java.util.ArrayList; import java.util.List; import java.util.Map; import org.junit.jupiter.api.Test; - import org.springframework.data.mapping.PropertyPath; import org.springframework.data.mapping.model.SimpleTypeHolder; import org.springframework.data.projection.EntityProjection; @@ -188,10 +184,13 @@ class EntityProjectionIntrospectorUnitTests { Map> domains; } - @Getter static class WithMapOfCollectionProjection { Map> domains; + + public Map> getDomains() { + return domains; + } } interface WithCollectionProjection { @@ -234,16 +233,23 @@ class EntityProjectionIntrospectorUnitTests { String getFoo(); } - @Value static class DomainClassDto { - String id; - long value; + final String id; + final long value; public DomainClassDto(String id, long value) { this.id = id; this.value = value; } + + public String getId() { + return id; + } + + public long getValue() { + return value; + } } static class Person { diff --git a/src/test/java/org/springframework/data/mapping/model/AbstractPersistentPropertyUnitTests.java b/src/test/java/org/springframework/data/mapping/model/AbstractPersistentPropertyUnitTests.java index e1f81bcc5..a15e63513 100755 --- a/src/test/java/org/springframework/data/mapping/model/AbstractPersistentPropertyUnitTests.java +++ b/src/test/java/org/springframework/data/mapping/model/AbstractPersistentPropertyUnitTests.java @@ -17,9 +17,6 @@ package org.springframework.data.mapping.model; import static org.assertj.core.api.Assertions.*; -import lombok.Getter; -import lombok.Setter; - import java.beans.IntrospectionException; import java.beans.Introspector; import java.beans.PropertyDescriptor; @@ -288,10 +285,16 @@ public class AbstractPersistentPropertyUnitTests { } - @Getter - @Setter class GenericGetter { T genericField; + + public T getGenericField() { + return genericField; + } + + public void setGenericField(T genericField) { + this.genericField = genericField; + } } class ConcreteGetter extends GenericGetter {} diff --git a/src/test/java/org/springframework/data/mapping/model/BasicPersistentEntityUnitTests.java b/src/test/java/org/springframework/data/mapping/model/BasicPersistentEntityUnitTests.java index 0676b4766..c2798c032 100755 --- a/src/test/java/org/springframework/data/mapping/model/BasicPersistentEntityUnitTests.java +++ b/src/test/java/org/springframework/data/mapping/model/BasicPersistentEntityUnitTests.java @@ -18,8 +18,6 @@ package org.springframework.data.mapping.model; import static org.assertj.core.api.Assertions.*; import static org.mockito.Mockito.*; -import lombok.RequiredArgsConstructor; - import java.lang.annotation.Annotation; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -445,24 +443,36 @@ class BasicPersistentEntityUnitTests> { // DATACMNS-1366 - @RequiredArgsConstructor private static class PropertyPopulationRequired { private final String firstname, lastname; private String email; + + public PropertyPopulationRequired(String firstname, String lastname) { + this.firstname = firstname; + this.lastname = lastname; + } } - @RequiredArgsConstructor private static class PropertyPopulationNotRequired { private final String firstname, lastname; + + public PropertyPopulationNotRequired(String firstname, String lastname) { + this.firstname = firstname; + this.lastname = lastname; + } } - @RequiredArgsConstructor private static class PropertyPopulationNotRequiredWithTransient { private final String firstname, lastname; private @Transient String email; + + public PropertyPopulationNotRequiredWithTransient(String firstname, String lastname) { + this.firstname = firstname; + this.lastname = lastname; + } } // #2325 diff --git a/src/test/java/org/springframework/data/mapping/model/ClassGeneratingPropertyAccessorFactoryDatatypeTests.java b/src/test/java/org/springframework/data/mapping/model/ClassGeneratingPropertyAccessorFactoryDatatypeTests.java index 0b7406b7b..8d05613cb 100755 --- a/src/test/java/org/springframework/data/mapping/model/ClassGeneratingPropertyAccessorFactoryDatatypeTests.java +++ b/src/test/java/org/springframework/data/mapping/model/ClassGeneratingPropertyAccessorFactoryDatatypeTests.java @@ -17,15 +17,12 @@ package org.springframework.data.mapping.model; import static org.assertj.core.api.Assertions.*; -import lombok.Data; - import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; - import org.springframework.data.annotation.AccessType; import org.springframework.data.annotation.AccessType.Type; import org.springframework.data.mapping.PersistentProperty; @@ -122,8 +119,7 @@ public class ClassGeneratingPropertyAccessorFactoryDatatypeTests { void shouldUseClassPropertyAccessorFactory(Object bean, String propertyName, Object value, String displayName) throws Exception { - var persistentEntity = mappingContext - .getRequiredPersistentEntity(bean.getClass()); + var persistentEntity = mappingContext.getRequiredPersistentEntity(bean.getClass()); assertThat(ReflectionTestUtils.getField(persistentEntity, "propertyAccessorFactory")) .isInstanceOfSatisfying(InstantiationAwarePropertyAccessorFactory.class, it -> { @@ -138,8 +134,7 @@ public class ClassGeneratingPropertyAccessorFactoryDatatypeTests { private PersistentProperty getProperty(Object bean, String name) { - var persistentEntity = mappingContext - .getRequiredPersistentEntity(bean.getClass()); + var persistentEntity = mappingContext.getRequiredPersistentEntity(bean.getClass()); return persistentEntity.getPersistentProperty(name); } @@ -193,7 +188,6 @@ public class ClassGeneratingPropertyAccessorFactoryDatatypeTests { // DATACMNS-809 @AccessType(Type.PROPERTY) - @Data public static class PropertyAccess { int primitiveInteger; @@ -238,6 +232,279 @@ public class ClassGeneratingPropertyAccessorFactoryDatatypeTests { String string; String[] stringArray; + + public int getPrimitiveInteger() { + return this.primitiveInteger; + } + + public int[] getPrimitiveIntegerArray() { + return this.primitiveIntegerArray; + } + + public Integer getBoxedInteger() { + return this.boxedInteger; + } + + public Integer[] getBoxedIntegerArray() { + return this.boxedIntegerArray; + } + + public short getPrimitiveShort() { + return this.primitiveShort; + } + + public short[] getPrimitiveShortArray() { + return this.primitiveShortArray; + } + + public Short getBoxedShort() { + return this.boxedShort; + } + + public Short[] getBoxedShortArray() { + return this.boxedShortArray; + } + + public byte getPrimitiveByte() { + return this.primitiveByte; + } + + public byte[] getPrimitiveByteArray() { + return this.primitiveByteArray; + } + + public Byte getBoxedByte() { + return this.boxedByte; + } + + public Byte[] getBoxedByteArray() { + return this.boxedByteArray; + } + + public char getPrimitiveChar() { + return this.primitiveChar; + } + + public char[] getPrimitiveCharArray() { + return this.primitiveCharArray; + } + + public Character getBoxedChar() { + return this.boxedChar; + } + + public Character[] getBoxedCharArray() { + return this.boxedCharArray; + } + + public boolean isPrimitiveBoolean() { + return this.primitiveBoolean; + } + + public boolean[] getPrimitiveBooleanArray() { + return this.primitiveBooleanArray; + } + + public Boolean getBoxedBoolean() { + return this.boxedBoolean; + } + + public Boolean[] getBoxedBooleanArray() { + return this.boxedBooleanArray; + } + + public float getPrimitiveFloat() { + return this.primitiveFloat; + } + + public float[] getPrimitiveFloatArray() { + return this.primitiveFloatArray; + } + + public Float getBoxedFloat() { + return this.boxedFloat; + } + + public Float[] getBoxedFloatArray() { + return this.boxedFloatArray; + } + + public double getPrimitiveDouble() { + return this.primitiveDouble; + } + + public double[] getPrimitiveDoubleArray() { + return this.primitiveDoubleArray; + } + + public Double getBoxedDouble() { + return this.boxedDouble; + } + + public Double[] getBoxedDoubleArray() { + return this.boxedDoubleArray; + } + + public long getPrimitiveLong() { + return this.primitiveLong; + } + + public long[] getPrimitiveLongArray() { + return this.primitiveLongArray; + } + + public Long getBoxedLong() { + return this.boxedLong; + } + + public Long[] getBoxedLongArray() { + return this.boxedLongArray; + } + + public String getString() { + return this.string; + } + + public String[] getStringArray() { + return this.stringArray; + } + + public void setPrimitiveInteger(int primitiveInteger) { + this.primitiveInteger = primitiveInteger; + } + + public void setPrimitiveIntegerArray(int[] primitiveIntegerArray) { + this.primitiveIntegerArray = primitiveIntegerArray; + } + + public void setBoxedInteger(Integer boxedInteger) { + this.boxedInteger = boxedInteger; + } + + public void setBoxedIntegerArray(Integer[] boxedIntegerArray) { + this.boxedIntegerArray = boxedIntegerArray; + } + + public void setPrimitiveShort(short primitiveShort) { + this.primitiveShort = primitiveShort; + } + + public void setPrimitiveShortArray(short[] primitiveShortArray) { + this.primitiveShortArray = primitiveShortArray; + } + + public void setBoxedShort(Short boxedShort) { + this.boxedShort = boxedShort; + } + + public void setBoxedShortArray(Short[] boxedShortArray) { + this.boxedShortArray = boxedShortArray; + } + + public void setPrimitiveByte(byte primitiveByte) { + this.primitiveByte = primitiveByte; + } + + public void setPrimitiveByteArray(byte[] primitiveByteArray) { + this.primitiveByteArray = primitiveByteArray; + } + + public void setBoxedByte(Byte boxedByte) { + this.boxedByte = boxedByte; + } + + public void setBoxedByteArray(Byte[] boxedByteArray) { + this.boxedByteArray = boxedByteArray; + } + + public void setPrimitiveChar(char primitiveChar) { + this.primitiveChar = primitiveChar; + } + + public void setPrimitiveCharArray(char[] primitiveCharArray) { + this.primitiveCharArray = primitiveCharArray; + } + + public void setBoxedChar(Character boxedChar) { + this.boxedChar = boxedChar; + } + + public void setBoxedCharArray(Character[] boxedCharArray) { + this.boxedCharArray = boxedCharArray; + } + + public void setPrimitiveBoolean(boolean primitiveBoolean) { + this.primitiveBoolean = primitiveBoolean; + } + + public void setPrimitiveBooleanArray(boolean[] primitiveBooleanArray) { + this.primitiveBooleanArray = primitiveBooleanArray; + } + + public void setBoxedBoolean(Boolean boxedBoolean) { + this.boxedBoolean = boxedBoolean; + } + + public void setBoxedBooleanArray(Boolean[] boxedBooleanArray) { + this.boxedBooleanArray = boxedBooleanArray; + } + + public void setPrimitiveFloat(float primitiveFloat) { + this.primitiveFloat = primitiveFloat; + } + + public void setPrimitiveFloatArray(float[] primitiveFloatArray) { + this.primitiveFloatArray = primitiveFloatArray; + } + + public void setBoxedFloat(Float boxedFloat) { + this.boxedFloat = boxedFloat; + } + + public void setBoxedFloatArray(Float[] boxedFloatArray) { + this.boxedFloatArray = boxedFloatArray; + } + + public void setPrimitiveDouble(double primitiveDouble) { + this.primitiveDouble = primitiveDouble; + } + + public void setPrimitiveDoubleArray(double[] primitiveDoubleArray) { + this.primitiveDoubleArray = primitiveDoubleArray; + } + + public void setBoxedDouble(Double boxedDouble) { + this.boxedDouble = boxedDouble; + } + + public void setBoxedDoubleArray(Double[] boxedDoubleArray) { + this.boxedDoubleArray = boxedDoubleArray; + } + + public void setPrimitiveLong(long primitiveLong) { + this.primitiveLong = primitiveLong; + } + + public void setPrimitiveLongArray(long[] primitiveLongArray) { + this.primitiveLongArray = primitiveLongArray; + } + + public void setBoxedLong(Long boxedLong) { + this.boxedLong = boxedLong; + } + + public void setBoxedLongArray(Long[] boxedLongArray) { + this.boxedLongArray = boxedLongArray; + } + + public void setString(String string) { + this.string = string; + } + + public void setStringArray(String[] stringArray) { + this.stringArray = stringArray; + } + } // DATACMNS-916 @@ -291,7 +558,6 @@ public class ClassGeneratingPropertyAccessorFactoryDatatypeTests { // DATACMNS-916 @AccessType(Type.PROPERTY) - @Data private final static class PrivateFinalPropertyAccess { int primitiveInteger; @@ -337,5 +603,276 @@ public class ClassGeneratingPropertyAccessorFactoryDatatypeTests { String string; String[] stringArray; + public int getPrimitiveInteger() { + return primitiveInteger; + } + + public void setPrimitiveInteger(int primitiveInteger) { + this.primitiveInteger = primitiveInteger; + } + + public int[] getPrimitiveIntegerArray() { + return primitiveIntegerArray; + } + + public void setPrimitiveIntegerArray(int[] primitiveIntegerArray) { + this.primitiveIntegerArray = primitiveIntegerArray; + } + + public Integer getBoxedInteger() { + return boxedInteger; + } + + public void setBoxedInteger(Integer boxedInteger) { + this.boxedInteger = boxedInteger; + } + + public Integer[] getBoxedIntegerArray() { + return boxedIntegerArray; + } + + public void setBoxedIntegerArray(Integer[] boxedIntegerArray) { + this.boxedIntegerArray = boxedIntegerArray; + } + + public short getPrimitiveShort() { + return primitiveShort; + } + + public void setPrimitiveShort(short primitiveShort) { + this.primitiveShort = primitiveShort; + } + + public short[] getPrimitiveShortArray() { + return primitiveShortArray; + } + + public void setPrimitiveShortArray(short[] primitiveShortArray) { + this.primitiveShortArray = primitiveShortArray; + } + + public Short getBoxedShort() { + return boxedShort; + } + + public void setBoxedShort(Short boxedShort) { + this.boxedShort = boxedShort; + } + + public Short[] getBoxedShortArray() { + return boxedShortArray; + } + + public void setBoxedShortArray(Short[] boxedShortArray) { + this.boxedShortArray = boxedShortArray; + } + + public byte getPrimitiveByte() { + return primitiveByte; + } + + public void setPrimitiveByte(byte primitiveByte) { + this.primitiveByte = primitiveByte; + } + + public byte[] getPrimitiveByteArray() { + return primitiveByteArray; + } + + public void setPrimitiveByteArray(byte[] primitiveByteArray) { + this.primitiveByteArray = primitiveByteArray; + } + + public Byte getBoxedByte() { + return boxedByte; + } + + public void setBoxedByte(Byte boxedByte) { + this.boxedByte = boxedByte; + } + + public Byte[] getBoxedByteArray() { + return boxedByteArray; + } + + public void setBoxedByteArray(Byte[] boxedByteArray) { + this.boxedByteArray = boxedByteArray; + } + + public char getPrimitiveChar() { + return primitiveChar; + } + + public void setPrimitiveChar(char primitiveChar) { + this.primitiveChar = primitiveChar; + } + + public char[] getPrimitiveCharArray() { + return primitiveCharArray; + } + + public void setPrimitiveCharArray(char[] primitiveCharArray) { + this.primitiveCharArray = primitiveCharArray; + } + + public Character getBoxedChar() { + return boxedChar; + } + + public void setBoxedChar(Character boxedChar) { + this.boxedChar = boxedChar; + } + + public Character[] getBoxedCharArray() { + return boxedCharArray; + } + + public void setBoxedCharArray(Character[] boxedCharArray) { + this.boxedCharArray = boxedCharArray; + } + + public boolean isPrimitiveBoolean() { + return primitiveBoolean; + } + + public void setPrimitiveBoolean(boolean primitiveBoolean) { + this.primitiveBoolean = primitiveBoolean; + } + + public boolean[] getPrimitiveBooleanArray() { + return primitiveBooleanArray; + } + + public void setPrimitiveBooleanArray(boolean[] primitiveBooleanArray) { + this.primitiveBooleanArray = primitiveBooleanArray; + } + + public Boolean getBoxedBoolean() { + return boxedBoolean; + } + + public void setBoxedBoolean(Boolean boxedBoolean) { + this.boxedBoolean = boxedBoolean; + } + + public Boolean[] getBoxedBooleanArray() { + return boxedBooleanArray; + } + + public void setBoxedBooleanArray(Boolean[] boxedBooleanArray) { + this.boxedBooleanArray = boxedBooleanArray; + } + + public float getPrimitiveFloat() { + return primitiveFloat; + } + + public void setPrimitiveFloat(float primitiveFloat) { + this.primitiveFloat = primitiveFloat; + } + + public float[] getPrimitiveFloatArray() { + return primitiveFloatArray; + } + + public void setPrimitiveFloatArray(float[] primitiveFloatArray) { + this.primitiveFloatArray = primitiveFloatArray; + } + + public Float getBoxedFloat() { + return boxedFloat; + } + + public void setBoxedFloat(Float boxedFloat) { + this.boxedFloat = boxedFloat; + } + + public Float[] getBoxedFloatArray() { + return boxedFloatArray; + } + + public void setBoxedFloatArray(Float[] boxedFloatArray) { + this.boxedFloatArray = boxedFloatArray; + } + + public double getPrimitiveDouble() { + return primitiveDouble; + } + + public void setPrimitiveDouble(double primitiveDouble) { + this.primitiveDouble = primitiveDouble; + } + + public double[] getPrimitiveDoubleArray() { + return primitiveDoubleArray; + } + + public void setPrimitiveDoubleArray(double[] primitiveDoubleArray) { + this.primitiveDoubleArray = primitiveDoubleArray; + } + + public Double getBoxedDouble() { + return boxedDouble; + } + + public void setBoxedDouble(Double boxedDouble) { + this.boxedDouble = boxedDouble; + } + + public Double[] getBoxedDoubleArray() { + return boxedDoubleArray; + } + + public void setBoxedDoubleArray(Double[] boxedDoubleArray) { + this.boxedDoubleArray = boxedDoubleArray; + } + + public long getPrimitiveLong() { + return primitiveLong; + } + + public void setPrimitiveLong(long primitiveLong) { + this.primitiveLong = primitiveLong; + } + + public long[] getPrimitiveLongArray() { + return primitiveLongArray; + } + + public void setPrimitiveLongArray(long[] primitiveLongArray) { + this.primitiveLongArray = primitiveLongArray; + } + + public Long getBoxedLong() { + return boxedLong; + } + + public void setBoxedLong(Long boxedLong) { + this.boxedLong = boxedLong; + } + + public Long[] getBoxedLongArray() { + return boxedLongArray; + } + + public void setBoxedLongArray(Long[] boxedLongArray) { + this.boxedLongArray = boxedLongArray; + } + + public String getString() { + return string; + } + + public void setString(String string) { + this.string = string; + } + + public String[] getStringArray() { + return stringArray; + } + + public void setStringArray(String[] stringArray) { + this.stringArray = stringArray; + } } } diff --git a/src/test/java/org/springframework/data/mapping/model/ConvertingPropertyAccessorUnitTests.java b/src/test/java/org/springframework/data/mapping/model/ConvertingPropertyAccessorUnitTests.java index 2510f0545..5863fe88e 100755 --- a/src/test/java/org/springframework/data/mapping/model/ConvertingPropertyAccessorUnitTests.java +++ b/src/test/java/org/springframework/data/mapping/model/ConvertingPropertyAccessorUnitTests.java @@ -19,10 +19,6 @@ import static org.assertj.core.api.Assertions.*; import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.*; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.Value; - import java.util.stream.Stream; import org.junit.jupiter.api.DynamicTest; @@ -187,15 +183,34 @@ public class ConvertingPropertyAccessorUnitTests { Long id; } - @Value - static class Order { - Customer customer; + static final class Order { + private final Customer customer; + + public Order(Customer customer) { + this.customer = customer; + } + + public Customer getCustomer() { + return this.customer; + } + } - @Data - @AllArgsConstructor static class Customer { String firstname; + + public Customer(String firstname) { + this.firstname = firstname; + } + + public String getFirstname() { + return this.firstname; + } + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + } static class IntegerWrapper { @@ -203,11 +218,19 @@ public class ConvertingPropertyAccessorUnitTests { Integer boxed; } - @Value(staticConstructor = "$") - static class PrimitiveFixture implements Named { + static final class PrimitiveFixture implements Named { - PersistentProperty property; - Class type; + private final PersistentProperty property; + private final Class type; + + private PrimitiveFixture(PersistentProperty property, Class type) { + this.property = property; + this.type = type; + } + + public static PrimitiveFixture $(PersistentProperty property, Class type) { + return new PrimitiveFixture(property, type); + } @Override public String getName() { @@ -218,5 +241,14 @@ public class ConvertingPropertyAccessorUnitTests { public PrimitiveFixture getPayload() { return this; } + + public PersistentProperty getProperty() { + return this.property; + } + + public Class getType() { + return this.type; + } + } } diff --git a/src/test/java/org/springframework/data/mapping/model/PersistentEntityIsNewStrategyUnitTests.java b/src/test/java/org/springframework/data/mapping/model/PersistentEntityIsNewStrategyUnitTests.java index c19b18899..b38c9c85f 100644 --- a/src/test/java/org/springframework/data/mapping/model/PersistentEntityIsNewStrategyUnitTests.java +++ b/src/test/java/org/springframework/data/mapping/model/PersistentEntityIsNewStrategyUnitTests.java @@ -17,8 +17,6 @@ package org.springframework.data.mapping.model; import static org.assertj.core.api.Assertions.*; -import lombok.AllArgsConstructor; - import org.junit.jupiter.api.Test; import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Version; @@ -146,11 +144,14 @@ class PersistentEntityIsNewStrategyUnitTests { @Id Long id; } - @AllArgsConstructor static class PersistableEntity implements Persistable { boolean isNew; + public PersistableEntity(boolean isNew) { + this.isNew = isNew; + } + @Override public boolean isNew() { return isNew; diff --git a/src/test/java/org/springframework/data/mapping/model/PersistentPropertyAccessorTests.java b/src/test/java/org/springframework/data/mapping/model/PersistentPropertyAccessorTests.java index 1af8288b4..885dc240d 100644 --- a/src/test/java/org/springframework/data/mapping/model/PersistentPropertyAccessorTests.java +++ b/src/test/java/org/springframework/data/mapping/model/PersistentPropertyAccessorTests.java @@ -17,10 +17,6 @@ package org.springframework.data.mapping.model; import static org.assertj.core.api.Assertions.*; -import lombok.Data; -import lombok.Value; -import lombok.With; - import java.sql.Timestamp; import java.util.ArrayList; import java.util.List; @@ -29,7 +25,6 @@ import java.util.function.Function; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; - import org.springframework.data.classloadersupport.HidingClassLoader; import org.springframework.data.mapping.PersistentPropertyAccessor; import org.springframework.data.mapping.context.SampleMappingContext; @@ -199,8 +194,7 @@ public class PersistentPropertyAccessorTests { .loadClass("org.springframework.data.mapping.model.PersistentPropertyAccessorTests$ClassLoaderTest"); var factory = new ClassGeneratingPropertyAccessorFactory(); - var entity = MAPPING_CONTEXT - .getRequiredPersistentEntity(entityType); + var entity = MAPPING_CONTEXT.getRequiredPersistentEntity(entityType); assertThat(factory.isSupported(entity)).isFalse(); } @@ -209,18 +203,41 @@ public class PersistentPropertyAccessorTests { return MAPPING_CONTEXT.getRequiredPersistentEntity(bean.getClass()).getRequiredPersistentProperty(propertyName); } - @Data static class DataClass { String id; + + public String getId() { + return this.id; + } + + public void setId(String id) { + this.id = id; + } + } static class ClassLoaderTest {} - @Value + private static final class ValueClass { + private final String id; + private final String immutable; - private static class ValueClass { - @With String id; - String immutable; + public ValueClass(String id, String immutable) { + this.id = id; + this.immutable = immutable; + } + + public String getId() { + return this.id; + } + + public String getImmutable() { + return this.immutable; + } + + public ValueClass withId(String id) { + return this.id == id ? this : new ValueClass(id, this.immutable); + } } static class UnsettableVersion { diff --git a/src/test/java/org/springframework/data/mapping/model/PropertyUnitTests.java b/src/test/java/org/springframework/data/mapping/model/PropertyUnitTests.java index f9326a142..cba6ca342 100644 --- a/src/test/java/org/springframework/data/mapping/model/PropertyUnitTests.java +++ b/src/test/java/org/springframework/data/mapping/model/PropertyUnitTests.java @@ -17,9 +17,6 @@ package org.springframework.data.mapping.model; import static org.assertj.core.api.Assertions.*; -import lombok.Value; -import lombok.With; - import org.junit.jupiter.api.Test; import org.springframework.data.util.TypeInformation; import org.springframework.util.ReflectionUtils; @@ -35,18 +32,17 @@ class PropertyUnitTests { void shouldNotFindWitherMethod() { assertThat(Property - .of(TypeInformation.of(ImmutableType.class), ReflectionUtils.findField(ImmutableType.class, "id")) - .getWither()).isEmpty(); - assertThat(Property - .of(TypeInformation.of(ImmutableType.class), ReflectionUtils.findField(ImmutableType.class, "name")) - .getWither()).isEmpty(); + .of(TypeInformation.of(ImmutableType.class), ReflectionUtils.findField(ImmutableType.class, "id")).getWither()) + .isEmpty(); + assertThat( + Property.of(TypeInformation.of(ImmutableType.class), ReflectionUtils.findField(ImmutableType.class, "name")) + .getWither()).isEmpty(); } @Test // DATACMNS-1322 void shouldDiscoverWitherMethod() { - var property = Property.of(TypeInformation.of(WitherType.class), - ReflectionUtils.findField(WitherType.class, "id")); + var property = Property.of(TypeInformation.of(WitherType.class), ReflectionUtils.findField(WitherType.class, "id")); assertThat(property.getWither()).isPresent().hasValueSatisfying(actual -> { assertThat(actual.getName()).isEqualTo("withId"); @@ -76,11 +72,23 @@ class PropertyUnitTests { assertThat(property.getWither()).isEmpty(); } - @Value static class ImmutableType { - String id; - String name; + final String id; + final String name; + + public ImmutableType(String id, String name) { + this.id = id; + this.name = name; + } + + public String getId() { + return id; + } + + public String getName() { + return name; + } ImmutableType withId(Long id) { return null; @@ -95,12 +103,31 @@ class PropertyUnitTests { } } - @Value - @With - private static class WitherType { + private static final class WitherType { - String id; - String name; + private final String id; + private final String name; + + public WitherType(String id, String name) { + this.id = id; + this.name = name; + } + + public String getId() { + return this.id; + } + + public String getName() { + return this.name; + } + + public WitherType withId(String id) { + return this.id == id ? this : new WitherType(id, this.name); + } + + public WitherType withName(String name) { + return this.name == name ? this : new WitherType(this.id, name); + } } static abstract class WitherBaseClass { diff --git a/src/test/java/org/springframework/data/mapping/model/SimplePersistentPropertyPathAccessorUnitTests.java b/src/test/java/org/springframework/data/mapping/model/SimplePersistentPropertyPathAccessorUnitTests.java index df9129869..09f62deac 100644 --- a/src/test/java/org/springframework/data/mapping/model/SimplePersistentPropertyPathAccessorUnitTests.java +++ b/src/test/java/org/springframework/data/mapping/model/SimplePersistentPropertyPathAccessorUnitTests.java @@ -17,11 +17,6 @@ package org.springframework.data.mapping.model; import static org.assertj.core.api.Assertions.*; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.Value; -import lombok.experimental.Wither; - import java.util.Arrays; import java.util.Collections; import java.util.HashMap; @@ -30,7 +25,6 @@ import java.util.Map; import java.util.stream.Stream; import org.junit.jupiter.api.Test; - import org.springframework.data.mapping.AccessOptions; import org.springframework.data.mapping.AccessOptions.SetOptions.SetNulls; import org.springframework.data.mapping.PersistentEntity; @@ -122,25 +116,62 @@ class SimplePersistentPropertyPathAccessorUnitTests { return accessor; } - @Data - @AllArgsConstructor static class Customer { String firstname; + + public Customer(String firstname) { + this.firstname = firstname; + } + + public String getFirstname() { + return this.firstname; + } + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + } - @Value - private static class Customers { - @Wither List customers; - @Wither Map customerMap; + private static final class Customers { + private final List customers; + private final Map customerMap; + + public Customers(List customers, Map customerMap) { + this.customers = customers; + this.customerMap = customerMap; + } + + public List getCustomers() { + return this.customers; + } + + public Map getCustomerMap() { + return this.customerMap; + } + + public Customers withCustomers(List customers) { + return this.customers == customers ? this : new Customers(customers, this.customerMap); + } + + public Customers withCustomerMap(Map customerMap) { + return this.customerMap == customerMap ? this : new Customers(this.customers, customerMap); + } } - @AllArgsConstructor static class CustomerWrapper { Customer customer; + + public CustomerWrapper(Customer customer) { + this.customer = customer; + } } - @AllArgsConstructor static class CustomerWrapperWrapper { CustomerWrapper wrapper; + + public CustomerWrapperWrapper(CustomerWrapper wrapper) { + this.wrapper = wrapper; + } } } diff --git a/src/test/java/org/springframework/data/repository/config/DefaultRepositoryConfigurationUnitTests.java b/src/test/java/org/springframework/data/repository/config/DefaultRepositoryConfigurationUnitTests.java index 1e8df2a58..2f7a689e7 100755 --- a/src/test/java/org/springframework/data/repository/config/DefaultRepositoryConfigurationUnitTests.java +++ b/src/test/java/org/springframework/data/repository/config/DefaultRepositoryConfigurationUnitTests.java @@ -18,9 +18,6 @@ package org.springframework.data.repository.config; import static org.assertj.core.api.Assertions.*; import static org.mockito.Mockito.*; -import lombok.EqualsAndHashCode; -import lombok.Value; - import java.util.Optional; import org.junit.jupiter.api.BeforeEach; @@ -30,7 +27,6 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; - import org.springframework.beans.factory.config.ConstructorArgumentValues; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.data.repository.query.QueryLookupStrategy.Key; @@ -90,10 +86,22 @@ class DefaultRepositoryConfigurationUnitTests { return new DefaultRepositoryConfiguration<>(source, beanDefinition, extension); } - @Value - @EqualsAndHashCode(callSuper = true) - private static class SimplerRepositoryConfigurationExtension extends RepositoryConfigurationExtensionSupport { - String repositoryFactoryBeanClassName, modulePrefix; + private static final class SimplerRepositoryConfigurationExtension extends RepositoryConfigurationExtensionSupport { + private final String repositoryFactoryBeanClassName, modulePrefix; + + public SimplerRepositoryConfigurationExtension(String repositoryFactoryBeanClassName, String modulePrefix) { + this.repositoryFactoryBeanClassName = repositoryFactoryBeanClassName; + this.modulePrefix = modulePrefix; + } + + public String getRepositoryFactoryBeanClassName() { + return this.repositoryFactoryBeanClassName; + } + + public String getModulePrefix() { + return this.modulePrefix; + } + } private static RootBeanDefinition createBeanDefinition(String repositoryInterfaceName) { diff --git a/src/test/java/org/springframework/data/repository/core/support/DefaultRepositoryInformationUnitTests.java b/src/test/java/org/springframework/data/repository/core/support/DefaultRepositoryInformationUnitTests.java index 700c591dd..64a97deba 100755 --- a/src/test/java/org/springframework/data/repository/core/support/DefaultRepositoryInformationUnitTests.java +++ b/src/test/java/org/springframework/data/repository/core/support/DefaultRepositoryInformationUnitTests.java @@ -17,8 +17,6 @@ package org.springframework.data.repository.core.support; import static org.assertj.core.api.Assertions.*; -import lombok.experimental.Delegate; - import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -36,7 +34,6 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; - import org.springframework.data.annotation.QueryAnnotation; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; @@ -399,7 +396,55 @@ class DefaultRepositoryInformationUnitTests { static class DummyRepositoryImpl implements CrudRepository { - private @Delegate CrudRepository delegate; + private CrudRepository delegate; + + public S save(S entity) { + return this.delegate.save(entity); + } + + public Iterable saveAll(Iterable entities) { + return this.delegate.saveAll(entities); + } + + public Optional findById(ID id) { + return this.delegate.findById(id); + } + + public boolean existsById(ID id) { + return this.delegate.existsById(id); + } + + public Iterable findAll() { + return this.delegate.findAll(); + } + + public Iterable findAllById(Iterable ids) { + return this.delegate.findAllById(ids); + } + + public long count() { + return this.delegate.count(); + } + + public void deleteById(ID id) { + this.delegate.deleteById(id); + } + + public void delete(T entity) { + this.delegate.delete(entity); + } + + public void deleteAllById(Iterable ids) { + this.delegate.deleteAllById(ids); + } + + public void deleteAll(Iterable entities) { + this.delegate.deleteAll(entities); + } + + public void deleteAll() { + this.delegate.deleteAll(); + } } // DATACMNS-1008, DATACMNS-854, DATACMNS-912 diff --git a/src/test/java/org/springframework/data/repository/core/support/EventPublishingRepositoryProxyPostProcessorUnitTests.java b/src/test/java/org/springframework/data/repository/core/support/EventPublishingRepositoryProxyPostProcessorUnitTests.java index 7fbc72ddc..c68a958b7 100644 --- a/src/test/java/org/springframework/data/repository/core/support/EventPublishingRepositoryProxyPostProcessorUnitTests.java +++ b/src/test/java/org/springframework/data/repository/core/support/EventPublishingRepositoryProxyPostProcessorUnitTests.java @@ -19,10 +19,6 @@ import static org.assertj.core.api.Assertions.*; import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.*; -import lombok.Getter; -import lombok.RequiredArgsConstructor; -import lombok.Value; - import java.lang.reflect.Method; import java.util.Arrays; import java.util.Collection; @@ -37,7 +33,6 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; - import org.springframework.aop.framework.ProxyFactory; import org.springframework.context.ApplicationEventPublisher; import org.springframework.data.domain.AfterDomainEventPublication; @@ -347,27 +342,62 @@ class EventPublishingRepositoryProxyPostProcessorUnitTests { doReturn(returnValue).when(invocation).proceed(); } - @Value(staticConstructor = "of") - static class MultipleEvents { - @Getter(onMethod = @__(@DomainEvents)) Collection events; + static final class MultipleEvents { + private final Collection events; + + private MultipleEvents(Collection events) { + this.events = events; + } + + public static MultipleEvents of(Collection events) { + return new MultipleEvents(events); + } + + @DomainEvents + public Collection getEvents() { + return this.events; + } } - @RequiredArgsConstructor(staticName = "of") static class EventsWithClearing { - @Getter(onMethod = @__(@DomainEvents)) final Collection events; + final Collection events; + + private EventsWithClearing(Collection events) { + this.events = events; + } + + public static EventsWithClearing of(Collection events) { + return new EventsWithClearing(events); + } @AfterDomainEventPublication void clearDomainEvents() {} + + @DomainEvents + public Collection getEvents() { + return this.events; + } } - @Value(staticConstructor = "of") - private static class OneEvent { - @Getter(onMethod = @__(@DomainEvents)) Object event; + private static final class OneEvent { + private final Object event; + + private OneEvent(Object event) { + this.event = event; + } + + public static OneEvent of(Object event) { + return new OneEvent(event); + } + + @DomainEvents + public Object getEvent() { + return this.event; + } } - @Value private static class SomeEvent { - UUID id = UUID.randomUUID(); + final UUID id = UUID.randomUUID(); } interface SampleRepository extends CrudRepository { diff --git a/src/test/java/org/springframework/data/repository/core/support/QueryExecutionResultHandlerUnitTests.java b/src/test/java/org/springframework/data/repository/core/support/QueryExecutionResultHandlerUnitTests.java index 16f3de2c5..f0a565b6f 100755 --- a/src/test/java/org/springframework/data/repository/core/support/QueryExecutionResultHandlerUnitTests.java +++ b/src/test/java/org/springframework/data/repository/core/support/QueryExecutionResultHandlerUnitTests.java @@ -23,7 +23,6 @@ import io.reactivex.rxjava3.core.Observable; import io.reactivex.rxjava3.core.Single; import io.vavr.control.Option; import io.vavr.control.Try; -import lombok.Value; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -41,7 +40,6 @@ import java.util.stream.Collectors; import org.assertj.core.api.SoftAssertions; import org.junit.jupiter.api.Test; import org.reactivestreams.Publisher; - import org.springframework.dao.InvalidDataAccessApiUsageException; import org.springframework.data.repository.Repository; import org.springframework.data.util.Streamable; @@ -460,10 +458,13 @@ class QueryExecutionResultHandlerUnitTests { // DATACMNS-1430 - @Value static class CustomStreamableWrapper implements Streamable { - Streamable source; + final Streamable source; + + public CustomStreamableWrapper(Streamable source) { + this.source = source; + } @Override public Iterator iterator() { diff --git a/src/test/java/org/springframework/data/repository/core/support/RepositoryCompositionUnitTests.java b/src/test/java/org/springframework/data/repository/core/support/RepositoryCompositionUnitTests.java index d0d0d6e77..b86a6d804 100644 --- a/src/test/java/org/springframework/data/repository/core/support/RepositoryCompositionUnitTests.java +++ b/src/test/java/org/springframework/data/repository/core/support/RepositoryCompositionUnitTests.java @@ -18,14 +18,11 @@ package org.springframework.data.repository.core.support; import static org.assertj.core.api.Assertions.*; import static org.mockito.Mockito.*; -import lombok.Data; - import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; - import org.springframework.data.annotation.Id; import org.springframework.data.domain.Example; import org.springframework.data.repository.Repository; @@ -177,16 +174,30 @@ class RepositoryCompositionUnitTests { Person findOne(Person entity); } - @Data static class Person { @Id String id; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } } - @Data static class Contact { @Id String id; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } } interface OrderedRepository extends Repository, FooMixin, BarMixin { diff --git a/src/test/java/org/springframework/data/repository/core/support/RepositoryMethodInvokerUnitTests.java b/src/test/java/org/springframework/data/repository/core/support/RepositoryMethodInvokerUnitTests.java index 32f61f8dd..169de59bc 100644 --- a/src/test/java/org/springframework/data/repository/core/support/RepositoryMethodInvokerUnitTests.java +++ b/src/test/java/org/springframework/data/repository/core/support/RepositoryMethodInvokerUnitTests.java @@ -23,9 +23,6 @@ import kotlin.coroutines.CoroutineContext; import kotlinx.coroutines.flow.Flow; import kotlinx.coroutines.flow.FlowKt; import kotlinx.coroutines.reactor.ReactorContext; -import lombok.AllArgsConstructor; -import lombok.NoArgsConstructor; -import lombok.ToString; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -405,11 +402,19 @@ class RepositoryMethodInvokerUnitTests { Mono findByName(String name); } - @ToString - @AllArgsConstructor - @NoArgsConstructor static class TestDummy { String id; String name; + + public TestDummy(String id, String name) { + this.id = id; + this.name = name; + } + + public TestDummy() {} + + public String toString() { + return "RepositoryMethodInvokerUnitTests.TestDummy(id=" + this.id + ", name=" + this.name + ")"; + } } } diff --git a/src/test/java/org/springframework/data/repository/query/ExtensionAwareEvaluationContextProviderUnitTests.java b/src/test/java/org/springframework/data/repository/query/ExtensionAwareEvaluationContextProviderUnitTests.java index 9971af4ef..eba88b789 100755 --- a/src/test/java/org/springframework/data/repository/query/ExtensionAwareEvaluationContextProviderUnitTests.java +++ b/src/test/java/org/springframework/data/repository/query/ExtensionAwareEvaluationContextProviderUnitTests.java @@ -19,8 +19,6 @@ import static org.assertj.core.api.Assertions.*; import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.*; -import lombok.RequiredArgsConstructor; - import java.io.Serializable; import java.lang.reflect.Method; import java.util.ArrayList; @@ -34,7 +32,6 @@ import java.util.concurrent.atomic.AtomicInteger; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.Mockito; - import org.springframework.beans.factory.ListableBeanFactory; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; @@ -323,13 +320,17 @@ class ExtensionAwareEvaluationContextProviderUnitTests { })); } - @RequiredArgsConstructor public static class DummyExtension implements org.springframework.data.spel.spi.EvaluationContextExtension { public static String DUMMY_KEY = "dummy"; private final String key, value; + public DummyExtension(String key, String value) { + this.key = key; + this.value = value; + } + @Override public String getExtensionId() { return key; diff --git a/src/test/java/org/springframework/data/repository/query/ParametersUnitTests.java b/src/test/java/org/springframework/data/repository/query/ParametersUnitTests.java index bea7d7b78..d73466484 100755 --- a/src/test/java/org/springframework/data/repository/query/ParametersUnitTests.java +++ b/src/test/java/org/springframework/data/repository/query/ParametersUnitTests.java @@ -28,8 +28,8 @@ import org.reactivestreams.Publisher; import org.springframework.data.domain.OffsetScrollPosition; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; -import org.springframework.data.domain.Window; import org.springframework.data.domain.Sort; +import org.springframework.data.domain.Window; import org.springframework.test.util.ReflectionTestUtils; /** diff --git a/src/test/java/org/springframework/data/repository/query/QueryMethodUnitTests.java b/src/test/java/org/springframework/data/repository/query/QueryMethodUnitTests.java index e5ad94eef..baa9cf6f6 100755 --- a/src/test/java/org/springframework/data/repository/query/QueryMethodUnitTests.java +++ b/src/test/java/org/springframework/data/repository/query/QueryMethodUnitTests.java @@ -19,7 +19,6 @@ import static org.assertj.core.api.Assertions.*; import io.vavr.collection.Seq; import io.vavr.control.Option; -import org.springframework.data.domain.Window; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -35,6 +34,7 @@ import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.ScrollPosition; import org.springframework.data.domain.Slice; +import org.springframework.data.domain.Window; import org.springframework.data.projection.ProjectionFactory; import org.springframework.data.projection.SpelAwareProxyProjectionFactory; import org.springframework.data.repository.Repository; diff --git a/src/test/java/org/springframework/data/repository/query/ResultProcessorUnitTests.java b/src/test/java/org/springframework/data/repository/query/ResultProcessorUnitTests.java index adb70ae63..c7f0fc0ee 100755 --- a/src/test/java/org/springframework/data/repository/query/ResultProcessorUnitTests.java +++ b/src/test/java/org/springframework/data/repository/query/ResultProcessorUnitTests.java @@ -21,7 +21,6 @@ import static org.mockito.Mockito.*; import io.reactivex.rxjava3.core.Flowable; import io.reactivex.rxjava3.core.Observable; import io.reactivex.rxjava3.core.Single; -import lombok.Getter; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; @@ -34,7 +33,6 @@ import java.util.stream.Collectors; import java.util.stream.Stream; import org.junit.jupiter.api.Test; - import org.springframework.beans.factory.annotation.Value; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageImpl; @@ -156,8 +154,7 @@ class ResultProcessorUnitTests { @Test // DATACMNS-89 void refrainsFromProjectingIfThePreparingConverterReturnsACompatibleInstance() throws Exception { - var result = getProcessor("findAllDtos").processResult(new Sample("Dave", "Matthews"), - source -> new SampleDto()); + var result = getProcessor("findAllDtos").processResult(new Sample("Dave", "Matthews"), source -> new SampleDto()); assertThat(result).isInstanceOf(SampleDto.class); } @@ -247,8 +244,7 @@ class ResultProcessorUnitTests { @Test // DATACMNS-836 @SuppressWarnings("unchecked") - void refrainsFromProjectingUsingReactiveWrappersIfThePreparingConverterReturnsACompatibleInstance() - throws Exception { + void refrainsFromProjectingUsingReactiveWrappersIfThePreparingConverterReturnsACompatibleInstance() throws Exception { var processor = getProcessor("findMonoSampleDto"); @@ -405,7 +401,6 @@ class ResultProcessorUnitTests { } } - @Getter static abstract class AbstractDto { final String firstname, lastname; @@ -413,6 +408,14 @@ class ResultProcessorUnitTests { this.firstname = firstname; this.lastname = lastname; } + + public String getFirstname() { + return this.firstname; + } + + public String getLastname() { + return this.lastname; + } } static class ConcreteDto extends AbstractDto { @@ -424,10 +427,8 @@ class ResultProcessorUnitTests { static class SampleDto {} - @lombok.Value - // Needs to be public until https://jira.spring.io/browse/SPR-14304 is resolved - public static class WrappingDto { - Sample sample; + public record WrappingDto(Sample sample) { + } interface SampleProjection { diff --git a/src/test/java/org/springframework/data/repository/sample/AddressRepositoryClient.java b/src/test/java/org/springframework/data/repository/sample/AddressRepositoryClient.java index ce631ae95..13f20558a 100644 --- a/src/test/java/org/springframework/data/repository/sample/AddressRepositoryClient.java +++ b/src/test/java/org/springframework/data/repository/sample/AddressRepositoryClient.java @@ -15,17 +15,21 @@ */ package org.springframework.data.repository.sample; -import lombok.Getter; -import lombok.RequiredArgsConstructor; - import org.springframework.stereotype.Component; /** * @author Oliver Gierke */ @Component -@RequiredArgsConstructor public class AddressRepositoryClient { - private final @Getter AddressRepository repository; + private final AddressRepository repository; + + public AddressRepositoryClient(AddressRepository repository) { + this.repository = repository; + } + + public AddressRepository getRepository() { + return this.repository; + } } diff --git a/src/test/java/org/springframework/data/repository/util/ClassUtilsUnitTests.java b/src/test/java/org/springframework/data/repository/util/ClassUtilsUnitTests.java index 9dfbfe4e6..8a6821e5c 100755 --- a/src/test/java/org/springframework/data/repository/util/ClassUtilsUnitTests.java +++ b/src/test/java/org/springframework/data/repository/util/ClassUtilsUnitTests.java @@ -15,8 +15,7 @@ */ package org.springframework.data.repository.util; -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.assertThatIllegalStateException; +import static org.assertj.core.api.Assertions.*; import java.io.Serializable; import java.lang.reflect.Method; diff --git a/src/test/java/org/springframework/data/repository/util/QueryExecutionConvertersUnitTests.java b/src/test/java/org/springframework/data/repository/util/QueryExecutionConvertersUnitTests.java index 660450b54..537f06a4e 100755 --- a/src/test/java/org/springframework/data/repository/util/QueryExecutionConvertersUnitTests.java +++ b/src/test/java/org/springframework/data/repository/util/QueryExecutionConvertersUnitTests.java @@ -24,7 +24,6 @@ import io.reactivex.rxjava3.core.Single; import io.vavr.collection.Seq; import io.vavr.control.Try; import io.vavr.control.Try.Failure; -import lombok.Value; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import scala.Option; @@ -33,6 +32,7 @@ import java.io.IOException; import java.util.Arrays; import java.util.Iterator; import java.util.List; +import java.util.Objects; import java.util.concurrent.CompletableFuture; import java.util.concurrent.Future; @@ -187,8 +187,7 @@ class QueryExecutionConvertersUnitTests { var method = Sample.class.getMethod("pages"); var returnType = TypeInformation.fromReturnTypeOf(method); - assertThat(QueryExecutionConverters.unwrapWrapperTypes(returnType).getType()) - .isEqualTo(String.class); + assertThat(QueryExecutionConverters.unwrapWrapperTypes(returnType).getType()).isEqualTo(String.class); } @Test // DATACMNS-983 @@ -282,19 +281,58 @@ class QueryExecutionConvertersUnitTests { // DATACMNS-1430 - @Value(staticConstructor = "of") - static class StreamableWrapper { - Streamable streamable; + static final class StreamableWrapper { + private final Streamable streamable; + + private StreamableWrapper(Streamable streamable) { + this.streamable = streamable; + } + + public static StreamableWrapper of(Streamable streamable) { + return new StreamableWrapper(streamable); + } + + public Streamable getStreamable() { + return this.streamable; + } + } - @Value - static class CustomStreamableWrapper implements Streamable { + static final class CustomStreamableWrapper implements Streamable { - Streamable source; + private final Streamable source; + + public CustomStreamableWrapper(Streamable source) { + this.source = source; + } @Override public Iterator iterator() { return source.iterator(); } + + public Streamable source() { + return source; + } + + @Override + public boolean equals(Object obj) { + if (obj == this) + return true; + if (obj == null || obj.getClass() != this.getClass()) + return false; + var that = (CustomStreamableWrapper) obj; + return Objects.equals(this.source, that.source); + } + + @Override + public int hashCode() { + return Objects.hash(source); + } + + @Override + public String toString() { + return "CustomStreamableWrapper[" + "source=" + source + ']'; + } } } diff --git a/src/test/java/org/springframework/data/util/AnnotationDetectionFieldCallbackUnitTests.java b/src/test/java/org/springframework/data/util/AnnotationDetectionFieldCallbackUnitTests.java index 843f64161..7b2a1d00b 100755 --- a/src/test/java/org/springframework/data/util/AnnotationDetectionFieldCallbackUnitTests.java +++ b/src/test/java/org/springframework/data/util/AnnotationDetectionFieldCallbackUnitTests.java @@ -17,8 +17,6 @@ package org.springframework.data.util; import static org.assertj.core.api.Assertions.*; -import lombok.Value; - import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.ReflectionUtils; @@ -55,9 +53,12 @@ public class AnnotationDetectionFieldCallbackUnitTests { assertThat(callback. getValue(new Empty())).isNull(); } - @Value static class Sample { @Autowired String value; + + public Sample(String value) { + this.value = value; + } } static class Empty {} diff --git a/src/test/java/org/springframework/data/util/ClassTypeInformationUnitTests.java b/src/test/java/org/springframework/data/util/ClassTypeInformationUnitTests.java index be793a6ad..7dff6289e 100755 --- a/src/test/java/org/springframework/data/util/ClassTypeInformationUnitTests.java +++ b/src/test/java/org/springframework/data/util/ClassTypeInformationUnitTests.java @@ -16,8 +16,6 @@ package org.springframework.data.util; import static org.assertj.core.api.Assertions.*; -import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.Assert.assertThat; import io.vavr.collection.Traversable; diff --git a/src/test/java/org/springframework/data/util/CustomCollectionsUnitTests.java b/src/test/java/org/springframework/data/util/CustomCollectionsUnitTests.java index a50938ee3..93d375440 100644 --- a/src/test/java/org/springframework/data/util/CustomCollectionsUnitTests.java +++ b/src/test/java/org/springframework/data/util/CustomCollectionsUnitTests.java @@ -17,8 +17,6 @@ package org.springframework.data.util; import static org.assertj.core.api.Assertions.*; -import lombok.AllArgsConstructor; - import java.util.Arrays; import java.util.Collection; import java.util.Collections; @@ -236,7 +234,6 @@ class CustomCollectionsUnitTests { .reduce(source, (value, mapper) -> mapper.apply(value), (l, r) -> r); } - @AllArgsConstructor static class CustomCollectionTester { private final Collection> expectedCollections, expectedMaps, collectionImplementations, mapImplementations; @@ -249,6 +246,14 @@ class CustomCollectionsUnitTests { this.mapImplementations = Collections.emptyList(); } + public CustomCollectionTester(Collection> expectedCollections, Collection> expectedMaps, + Collection> collectionImplementations, Collection> mapImplementations) { + this.expectedCollections = expectedCollections; + this.expectedMaps = expectedMaps; + this.collectionImplementations = collectionImplementations; + this.mapImplementations = mapImplementations; + } + public CustomCollectionTester withCollections(Class... types) { return new CustomCollectionTester(Arrays.asList(types), expectedMaps, collectionImplementations, mapImplementations); diff --git a/src/test/java/org/springframework/data/util/MethodInvocationRecorderUnitTests.java b/src/test/java/org/springframework/data/util/MethodInvocationRecorderUnitTests.java index 12d19aca2..a00f10f86 100644 --- a/src/test/java/org/springframework/data/util/MethodInvocationRecorderUnitTests.java +++ b/src/test/java/org/springframework/data/util/MethodInvocationRecorderUnitTests.java @@ -17,8 +17,6 @@ package org.springframework.data.util; import static org.assertj.core.api.Assertions.*; -import lombok.Getter; - import java.util.Collection; import org.junit.jupiter.api.Test; @@ -96,17 +94,35 @@ class MethodInvocationRecorderUnitTests { static final class FinalType {} - @Getter static class Foo { Bar bar; Collection bars; String name; int age; + + public Bar getBar() { + return this.bar; + } + + public Collection getBars() { + return this.bars; + } + + public String getName() { + return this.name; + } + + public int getAge() { + return this.age; + } } - @Getter static class Bar { FooBar fooBar; + + public FooBar getFooBar() { + return this.fooBar; + } } static class FooBar {} diff --git a/src/test/java/org/springframework/data/web/JsonProjectingMethodInterceptorFactoryUnitTests.java b/src/test/java/org/springframework/data/web/JsonProjectingMethodInterceptorFactoryUnitTests.java index 62295b34e..f410368cd 100755 --- a/src/test/java/org/springframework/data/web/JsonProjectingMethodInterceptorFactoryUnitTests.java +++ b/src/test/java/org/springframework/data/web/JsonProjectingMethodInterceptorFactoryUnitTests.java @@ -17,10 +17,6 @@ package org.springframework.data.web; import static org.assertj.core.api.Assertions.*; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - import java.io.ByteArrayInputStream; import java.nio.charset.StandardCharsets; import java.util.List; @@ -28,9 +24,9 @@ import java.util.Set; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; - import org.springframework.data.projection.ProjectionFactory; import org.springframework.data.projection.SpelAwareProxyProjectionFactory; +import org.springframework.util.ObjectUtils; import com.fasterxml.jackson.databind.ObjectMapper; import com.jayway.jsonpath.spi.json.JacksonJsonProvider; @@ -240,11 +236,42 @@ class JsonProjectingMethodInterceptorFactoryUnitTests { String getZipCodeButNotCity(); } - @Data - @AllArgsConstructor - @NoArgsConstructor static class Address { private String zipCode, city; + + public Address() {} + + public Address(String zipCode, String city) { + this.zipCode = zipCode; + this.city = city; + } + + public String getZipCode() { + return zipCode; + } + + public void setZipCode(String zipCode) { + this.zipCode = zipCode; + } + + public String getCity() { + return city; + } + + public void setCity(String city) { + this.city = city; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + if (o == null || getClass() != o.getClass()) + return false; + Address address = (Address) o; + return ObjectUtils.nullSafeEquals(zipCode, address.zipCode) && ObjectUtils.nullSafeEquals(city, address.city); + } + } @ProjectedPayload diff --git a/src/test/resources/META-INF/services/javax.annotation.processing.Processor b/src/test/resources/META-INF/services/javax.annotation.processing.Processor index fad31dbfd..0060cc3f1 100644 --- a/src/test/resources/META-INF/services/javax.annotation.processing.Processor +++ b/src/test/resources/META-INF/services/javax.annotation.processing.Processor @@ -1,3 +1 @@ com.querydsl.apt.QuerydslAnnotationProcessor -lombok.launch.AnnotationProcessorHider$AnnotationProcessor -lombok.launch.AnnotationProcessorHider$ClaimingProcessor