DATACMNS-1592 - Use Lombok's With and move off deprecated Wither.

We now migrate off Lombok's `@Wither` in favor of `@With`.
This commit is contained in:
Mark Paluch
2019-11-26 13:55:23 +01:00
parent 3fb7ff1dd2
commit e9a0ed7123
7 changed files with 25 additions and 21 deletions

View File

@@ -22,7 +22,7 @@ import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.Value;
import lombok.experimental.Wither;
import lombok.With;
import java.util.Collection;
import java.util.Collections;
@@ -41,6 +41,7 @@ import org.springframework.data.mapping.model.ConvertingPropertyAccessor;
/**
* @author Oliver Gierke
* @author Mark Paluch
*/
public class PersistentPropertyAccessorUnitTests {
@@ -204,13 +205,13 @@ public class PersistentPropertyAccessorUnitTests {
// DATACMNS-1322
@Value
@Wither(AccessLevel.PACKAGE)
@With(AccessLevel.PACKAGE)
static class NestedImmutable {
String value;
}
@Value
@Wither(AccessLevel.PACKAGE)
@With(AccessLevel.PACKAGE)
static class Outer {
NestedImmutable immutable;
}

View File

@@ -19,7 +19,7 @@ import static org.assertj.core.api.Assertions.*;
import lombok.Data;
import lombok.Value;
import lombok.experimental.Wither;
import lombok.With;
import java.sql.Timestamp;
import java.util.ArrayList;
@@ -217,7 +217,7 @@ public class PersistentPropertyAccessorTests {
@Value
static class ValueClass {
@Wither String id;
@With String id;
String immutable;
}

View File

@@ -18,7 +18,7 @@ package org.springframework.data.mapping.model;
import static org.assertj.core.api.Assertions.*;
import lombok.Value;
import lombok.experimental.Wither;
import lombok.With;
import org.junit.Test;
import org.springframework.data.util.ClassTypeInformation;
@@ -96,7 +96,7 @@ public class PropertyUnitTests {
}
@Value
@Wither
@With
static class WitherType {
String id;