Skip to content

Commit

Permalink
DATAREST-1174 - Enable constructor properties to make sure WrappedPro…
Browse files Browse the repository at this point in the history
…pertiesUnitTests 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.
  • Loading branch information
odrotbohm committed Jan 10, 2018
1 parent 623075a commit 9b0f0c7
Showing 1 changed file with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
import static org.hamcrest.MatcherAssert.*;
import static org.hamcrest.Matchers.*;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Collections;
import java.util.List;

Expand All @@ -32,6 +28,8 @@
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;
Expand Down Expand Up @@ -130,9 +128,7 @@ public void wrappedPropertiesShouldIgnoreSyntheticProperties() {
assertThat(wrappedProperties.hasPersistentPropertiesForField("street"), is(false));
}

@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonAutoDetect(fieldVisibility = Visibility.ANY)
static class OneLevelNesting {

String one;
Expand Down Expand Up @@ -171,9 +167,7 @@ void setWrapped(OneLevelNesting address) {}
</code>
* </pre>
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonAutoDetect(fieldVisibility = Visibility.ANY)
static class MultiLevelNesting {

String multi;
Expand All @@ -182,9 +176,7 @@ static class MultiLevelNesting {
@JsonUnwrapped(enabled = false) OneLevelNesting nested;
}

@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonAutoDetect(fieldVisibility = Visibility.ANY)
static class Address {

String street;
Expand Down

0 comments on commit 9b0f0c7

Please sign in to comment.