From 73e169cf2f8d069baf81abdaa2595824443ba047 Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Wed, 17 Feb 2021 09:44:46 +0100 Subject: [PATCH] Fixes the build. Use JUnit 4 instead of 5 for 1.1.x Remove jetbrains @NotNull annotation. Closes #921 --- .../jdbc/core/PersistentPropertyPathExtensionUnitTests.java | 3 --- .../jdbc/core/mapping/PersistentPropertyPathTestUtils.java | 2 -- .../config/EnableJdbcAuditingHsqlIntegrationTests.java | 3 +-- .../data/relational/core/sql/ConditionsUnitTests.java | 6 +++--- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/PersistentPropertyPathExtensionUnitTests.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/PersistentPropertyPathExtensionUnitTests.java index 3c55dc92..34cb964e 100644 --- a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/PersistentPropertyPathExtensionUnitTests.java +++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/PersistentPropertyPathExtensionUnitTests.java @@ -17,7 +17,6 @@ package org.springframework.data.jdbc.core; import java.util.List; -import org.jetbrains.annotations.NotNull; import org.junit.Test; import org.springframework.data.annotation.Id; import org.springframework.data.jdbc.core.mapping.JdbcMappingContext; @@ -200,12 +199,10 @@ public class PersistentPropertyPathExtensionUnitTests { }); } - @NotNull private PersistentPropertyPathExtension extPath(RelationalPersistentEntity entity) { return new PersistentPropertyPathExtension(context, entity); } - @NotNull private PersistentPropertyPathExtension extPath(String path) { return new PersistentPropertyPathExtension(context, createSimplePath(path)); } diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/mapping/PersistentPropertyPathTestUtils.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/mapping/PersistentPropertyPathTestUtils.java index cefceec9..42b2987c 100644 --- a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/mapping/PersistentPropertyPathTestUtils.java +++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/mapping/PersistentPropertyPathTestUtils.java @@ -17,7 +17,6 @@ package org.springframework.data.jdbc.core.mapping; import lombok.experimental.UtilityClass; -import org.jetbrains.annotations.NotNull; import org.springframework.data.mapping.PersistentPropertyPath; import org.springframework.data.relational.core.mapping.RelationalMappingContext; import org.springframework.data.relational.core.mapping.RelationalPersistentProperty; @@ -28,7 +27,6 @@ import org.springframework.data.relational.core.mapping.RelationalPersistentProp @UtilityClass public class PersistentPropertyPathTestUtils { - @NotNull public static PersistentPropertyPath getPath(RelationalMappingContext context, String path, Class baseType) { diff --git a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/config/EnableJdbcAuditingHsqlIntegrationTests.java b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/config/EnableJdbcAuditingHsqlIntegrationTests.java index 5bdfd011..8dacd2b8 100644 --- a/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/config/EnableJdbcAuditingHsqlIntegrationTests.java +++ b/spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/config/EnableJdbcAuditingHsqlIntegrationTests.java @@ -26,7 +26,6 @@ import java.util.concurrent.TimeUnit; import java.util.function.Consumer; import org.assertj.core.api.SoftAssertions; -import org.jetbrains.annotations.NotNull; import org.junit.Test; import org.springframework.context.ApplicationListener; import org.springframework.context.ConfigurableApplicationContext; @@ -271,7 +270,7 @@ public class EnableJdbcAuditingHsqlIntegrationTests { return new NamingStrategy() { - public String getTableName(@NotNull Class type) { + public String getTableName(Class type) { return "DummyEntity"; } }; diff --git a/spring-data-relational/src/test/java/org/springframework/data/relational/core/sql/ConditionsUnitTests.java b/spring-data-relational/src/test/java/org/springframework/data/relational/core/sql/ConditionsUnitTests.java index 48296d81..bd5ba976 100644 --- a/spring-data-relational/src/test/java/org/springframework/data/relational/core/sql/ConditionsUnitTests.java +++ b/spring-data-relational/src/test/java/org/springframework/data/relational/core/sql/ConditionsUnitTests.java @@ -5,7 +5,7 @@ import static org.assertj.core.api.Assertions.*; import java.util.ArrayList; import java.util.List; -import org.junit.jupiter.api.Test; +import org.junit.Test; /* * Copyright 2021 the original author or authors. @@ -22,10 +22,10 @@ import org.junit.jupiter.api.Test; * See the License for the specific language governing permissions and * limitations under the License. */ -class ConditionsUnitTests { +public class ConditionsUnitTests { @Test // gh-916 - void notInOfColumnAndExpression() { + public void notInOfColumnAndExpression() { Table table = Table.create("t"); Column column = Column.create("col", table);