From 7edfc754724bae168b68030f5e2bc23326ed5000 Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Wed, 10 Jan 2018 12:47:24 +0100 Subject: [PATCH] DATAREST-1174 - Enable constructor properties to make sure WrappedPropertiesUnitTests continue to work. Removed Lombok constructor and accessor generation to avoid having to deal with the changed default in Lombok 1.16.20 not generating @ConstructorProperties by default anymore. --- .../json/WrappedPropertiesUnitTests.java | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/json/WrappedPropertiesUnitTests.java b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/json/WrappedPropertiesUnitTests.java index ecbc9d93d..ecca223ac 100755 --- a/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/json/WrappedPropertiesUnitTests.java +++ b/spring-data-rest-webmvc/src/test/java/org/springframework/data/rest/webmvc/json/WrappedPropertiesUnitTests.java @@ -17,10 +17,6 @@ package org.springframework.data.rest.webmvc.json; import static org.assertj.core.api.Assertions.*; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - import java.util.Collections; import java.util.List; @@ -31,6 +27,8 @@ import org.springframework.data.mapping.PersistentEntity; import org.springframework.data.mapping.PersistentProperty; import org.springframework.data.mapping.context.PersistentEntities; +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonUnwrapped; @@ -129,9 +127,7 @@ public class WrappedPropertiesUnitTests { assertThat(wrappedProperties.hasPersistentPropertiesForField("street")).isFalse(); } - @Data - @AllArgsConstructor - @NoArgsConstructor + @JsonAutoDetect(fieldVisibility = Visibility.ANY) static class OneLevelNesting { String one; @@ -170,9 +166,7 @@ public class WrappedPropertiesUnitTests { * */ - @Data - @AllArgsConstructor - @NoArgsConstructor + @JsonAutoDetect(fieldVisibility = Visibility.ANY) static class MultiLevelNesting { String multi; @@ -181,9 +175,7 @@ public class WrappedPropertiesUnitTests { @JsonUnwrapped(enabled = false) OneLevelNesting nested; } - @Data - @AllArgsConstructor - @NoArgsConstructor + @JsonAutoDetect(fieldVisibility = Visibility.ANY) static class Address { String street;