Browse Source

DATAJDBC-436 - Replace @Wither with @With.

lombok.experimental.Wither is now deprecated and to be replaced by lombok.With which this change does.
pull/170/head
Jens Schauder 6 years ago
parent
commit
b74c82c724
  1. 10
      spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/AggregateChangeIdGenerationImmutableUnitTests.java
  2. 8
      spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/ImmutableAggregateTemplateHsqlIntegrationTests.java
  3. 8
      spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/convert/EntityRowMapperUnitTests.java
  4. 4
      spring-data-jdbc/src/test/java/org/springframework/data/jdbc/mybatis/DummyEntity.java
  5. 6
      spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryEmbeddedImmutableIntegrationTests.java
  6. 4
      spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryIdGenerationIntegrationTests.java
  7. 4
      spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/SimpleJdbcRepositoryEventsUnitTests.java

10
spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/AggregateChangeIdGenerationImmutableUnitTests.java

@ -22,7 +22,7 @@ import static org.assertj.core.api.SoftAssertions.*; @@ -22,7 +22,7 @@ import static org.assertj.core.api.SoftAssertions.*;
import lombok.AllArgsConstructor;
import lombok.Value;
import lombok.experimental.Wither;
import lombok.With;
import java.util.HashMap;
import java.util.List;
@ -436,7 +436,7 @@ public class AggregateChangeIdGenerationImmutableUnitTests { @@ -436,7 +436,7 @@ public class AggregateChangeIdGenerationImmutableUnitTests {
}
@Value
@Wither
@With
@AllArgsConstructor
private static class DummyEntity {
@ -461,7 +461,7 @@ public class AggregateChangeIdGenerationImmutableUnitTests { @@ -461,7 +461,7 @@ public class AggregateChangeIdGenerationImmutableUnitTests {
}
@Value
@Wither
@With
@AllArgsConstructor
private static class Content {
@ -482,7 +482,7 @@ public class AggregateChangeIdGenerationImmutableUnitTests { @@ -482,7 +482,7 @@ public class AggregateChangeIdGenerationImmutableUnitTests {
}
@Value
@Wither
@With
@AllArgsConstructor
private static class ContentNoId {
@ -501,7 +501,7 @@ public class AggregateChangeIdGenerationImmutableUnitTests { @@ -501,7 +501,7 @@ public class AggregateChangeIdGenerationImmutableUnitTests {
}
@Value
@Wither
@With
@AllArgsConstructor
private static class Tag {

8
spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/ImmutableAggregateTemplateHsqlIntegrationTests.java

@ -19,7 +19,7 @@ import static java.util.Collections.*; @@ -19,7 +19,7 @@ import static java.util.Collections.*;
import static org.assertj.core.api.Assertions.*;
import lombok.Value;
import lombok.experimental.Wither;
import lombok.With;
import org.assertj.core.api.SoftAssertions;
import org.junit.ClassRule;
@ -270,7 +270,7 @@ public class ImmutableAggregateTemplateHsqlIntegrationTests { @@ -270,7 +270,7 @@ public class ImmutableAggregateTemplateHsqlIntegrationTests {
}
@Value
@Wither
@With
static class LegoSet {
@Id Long id;
@ -280,7 +280,7 @@ public class ImmutableAggregateTemplateHsqlIntegrationTests { @@ -280,7 +280,7 @@ public class ImmutableAggregateTemplateHsqlIntegrationTests {
}
@Value
@Wither
@With
static class Manual {
@Id Long id;
@ -288,7 +288,7 @@ public class ImmutableAggregateTemplateHsqlIntegrationTests { @@ -288,7 +288,7 @@ public class ImmutableAggregateTemplateHsqlIntegrationTests {
}
@Value
@Wither
@With
static class Author {
@Id Long id;

8
spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/convert/EntityRowMapperUnitTests.java

@ -28,7 +28,7 @@ import lombok.NoArgsConstructor; @@ -28,7 +28,7 @@ import lombok.NoArgsConstructor;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import lombok.Value;
import lombok.experimental.Wither;
import lombok.With;
import java.sql.ResultSet;
import java.sql.SQLException;
@ -457,7 +457,7 @@ public class EntityRowMapperUnitTests { @@ -457,7 +457,7 @@ public class EntityRowMapperUnitTests {
// Model classes to be used in tests
@Wither
@With
@RequiredArgsConstructor
static class TrivialImmutable {
@ -486,7 +486,7 @@ public class EntityRowMapperUnitTests { @@ -486,7 +486,7 @@ public class EntityRowMapperUnitTests {
AggregateReference<Trivial, Long> trivialId;
}
@Wither
@With
@RequiredArgsConstructor
static class WithReferenceImmutable {
@ -502,7 +502,7 @@ public class EntityRowMapperUnitTests { @@ -502,7 +502,7 @@ public class EntityRowMapperUnitTests {
Trivial child;
}
@Wither
@With
@RequiredArgsConstructor
static class OneToOneImmutable {

4
spring-data-jdbc/src/test/java/org/springframework/data/jdbc/mybatis/DummyEntity.java

@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
*/
package org.springframework.data.jdbc.mybatis;
import lombok.experimental.Wither;
import lombok.With;
import org.apache.ibatis.type.Alias;
import org.springframework.data.annotation.Id;
@ -26,7 +26,7 @@ import org.springframework.data.annotation.Id; @@ -26,7 +26,7 @@ import org.springframework.data.annotation.Id;
@Alias("DummyEntity")
class DummyEntity {
@Wither @Id final Long id;
@With @Id final Long id;
final String name;
public DummyEntity(Long id, String name) {

6
spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryEmbeddedImmutableIntegrationTests.java

@ -21,7 +21,7 @@ import static org.assertj.core.api.Assertions.*; @@ -21,7 +21,7 @@ import static org.assertj.core.api.Assertions.*;
import lombok.Data;
import lombok.Value;
import lombok.experimental.Wither;
import lombok.With;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
@ -95,7 +95,7 @@ public class JdbcRepositoryEmbeddedImmutableIntegrationTests { @@ -95,7 +95,7 @@ public class JdbcRepositoryEmbeddedImmutableIntegrationTests {
interface DummyEntityRepository extends CrudRepository<DummyEntity, Long> {}
@Value
@Wither
@With
static class DummyEntity {
@Id Long id;
@ -104,7 +104,7 @@ public class JdbcRepositoryEmbeddedImmutableIntegrationTests { @@ -104,7 +104,7 @@ public class JdbcRepositoryEmbeddedImmutableIntegrationTests {
}
@Value
@Wither
@With
private static class Embeddable {
Long attr1;

4
spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/JdbcRepositoryIdGenerationIntegrationTests.java

@ -20,7 +20,7 @@ import static org.assertj.core.api.Assertions.*; @@ -20,7 +20,7 @@ import static org.assertj.core.api.Assertions.*;
import lombok.Data;
import lombok.Value;
import lombok.experimental.FieldDefaults;
import lombok.experimental.Wither;
import lombok.With;
import java.util.concurrent.atomic.AtomicLong;
@ -137,7 +137,7 @@ public class JdbcRepositoryIdGenerationIntegrationTests { @@ -137,7 +137,7 @@ public class JdbcRepositoryIdGenerationIntegrationTests {
}
@Value
@Wither
@With
static class ImmutableWithManualIdEntity {
@Id Long id;
String name;

4
spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/SimpleJdbcRepositoryEventsUnitTests.java

@ -23,7 +23,7 @@ import static org.mockito.Mockito.*; @@ -23,7 +23,7 @@ import static org.mockito.Mockito.*;
import junit.framework.AssertionFailedError;
import lombok.RequiredArgsConstructor;
import lombok.Value;
import lombok.experimental.Wither;
import lombok.With;
import java.util.ArrayList;
import java.util.HashMap;
@ -235,7 +235,7 @@ public class SimpleJdbcRepositoryEventsUnitTests { @@ -235,7 +235,7 @@ public class SimpleJdbcRepositoryEventsUnitTests {
interface DummyEntityRepository extends CrudRepository<DummyEntity, Long> {}
@Value
@Wither
@With
@RequiredArgsConstructor
static class DummyEntity {
@Id Long id;

Loading…
Cancel
Save