DATAJDBC-641 - Removes references of org.jetbrains.annotations.NotNull.

Those annotations cause build failures once the providing jar wasn't available anymore since kotlin removed that dependency.

Those annotations were present in the code by accident anyway since Spring has and uses its own set of annotations.
This commit is contained in:
Jens Schauder
2020-12-07 15:38:19 +01:00
committed by Mark Paluch
parent 3edfa51d4f
commit 550bec5a0c
7 changed files with 1 additions and 16 deletions

View File

@@ -25,7 +25,6 @@ import lombok.With;
import java.util.List; import java.util.List;
import org.jetbrains.annotations.NotNull;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Version; import org.springframework.data.annotation.Version;
@@ -134,12 +133,10 @@ public class JdbcAggregateChangeExecutorContextImmutableUnitTests {
return new PersistentPropertyPathExtension(context, getPersistentPropertyPath(path)); return new PersistentPropertyPathExtension(context, getPersistentPropertyPath(path));
} }
@NotNull
PersistentPropertyPath<RelationalPersistentProperty> getPersistentPropertyPath(String propertyName) { PersistentPropertyPath<RelationalPersistentProperty> getPersistentPropertyPath(String propertyName) {
return context.getPersistentPropertyPath(propertyName, DummyEntity.class); return context.getPersistentPropertyPath(propertyName, DummyEntity.class);
} }
@NotNull
Identifier createBackRef() { Identifier createBackRef() {
return JdbcIdentifierBuilder.forBackReferences(converter, toPathExt("content"), 23L).build(); return JdbcIdentifierBuilder.forBackReferences(converter, toPathExt("content"), 23L).build();
} }

View File

@@ -22,7 +22,6 @@ import static org.mockito.Mockito.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.jetbrains.annotations.NotNull;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Version; import org.springframework.data.annotation.Version;
@@ -148,12 +147,10 @@ public class JdbcAggregateChangeExecutorContextUnitTests {
return new PersistentPropertyPathExtension(context, getPersistentPropertyPath(path)); return new PersistentPropertyPathExtension(context, getPersistentPropertyPath(path));
} }
@NotNull
PersistentPropertyPath<RelationalPersistentProperty> getPersistentPropertyPath(String propertyName) { PersistentPropertyPath<RelationalPersistentProperty> getPersistentPropertyPath(String propertyName) {
return context.getPersistentPropertyPath(propertyName, DummyEntity.class); return context.getPersistentPropertyPath(propertyName, DummyEntity.class);
} }
@NotNull
Identifier createBackRef() { Identifier createBackRef() {
return JdbcIdentifierBuilder.forBackReferences(converter, toPathExt("content"), 23L).build(); return JdbcIdentifierBuilder.forBackReferences(converter, toPathExt("content"), 23L).build();
} }

View File

@@ -31,7 +31,6 @@ import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import org.jetbrains.annotations.NotNull;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor; import org.mockito.ArgumentCaptor;
@@ -192,7 +191,6 @@ public class DefaultDataAccessStrategyUnitTests {
assertThat(paramSourceCaptor.getValue().getValue("DUMMYENTITYROOT")).isEqualTo(rawId); assertThat(paramSourceCaptor.getValue().getValue("DUMMYENTITYROOT")).isEqualTo(rawId);
} }
@NotNull
private DefaultDataAccessStrategy createAccessStrategyWithConverter(List<?> converters) { private DefaultDataAccessStrategy createAccessStrategyWithConverter(List<?> converters) {
DelegatingDataAccessStrategy relationResolver = new DelegatingDataAccessStrategy(); DelegatingDataAccessStrategy relationResolver = new DelegatingDataAccessStrategy();

View File

@@ -17,7 +17,6 @@ package org.springframework.data.jdbc.core.mapping;
import lombok.experimental.UtilityClass; import lombok.experimental.UtilityClass;
import org.jetbrains.annotations.NotNull;
import org.springframework.data.mapping.PersistentPropertyPath; import org.springframework.data.mapping.PersistentPropertyPath;
import org.springframework.data.relational.core.mapping.RelationalMappingContext; import org.springframework.data.relational.core.mapping.RelationalMappingContext;
import org.springframework.data.relational.core.mapping.RelationalPersistentProperty; import org.springframework.data.relational.core.mapping.RelationalPersistentProperty;
@@ -28,7 +27,6 @@ import org.springframework.data.relational.core.mapping.RelationalPersistentProp
@UtilityClass @UtilityClass
public class PersistentPropertyPathTestUtils { public class PersistentPropertyPathTestUtils {
@NotNull
public static PersistentPropertyPath<RelationalPersistentProperty> getPath(RelationalMappingContext context, public static PersistentPropertyPath<RelationalPersistentProperty> getPath(RelationalMappingContext context,
String path, Class<?> baseType) { String path, Class<?> baseType) {

View File

@@ -26,7 +26,6 @@ import java.util.concurrent.TimeUnit;
import java.util.function.Consumer; import java.util.function.Consumer;
import org.assertj.core.api.SoftAssertions; import org.assertj.core.api.SoftAssertions;
import org.jetbrains.annotations.NotNull;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationListener; import org.springframework.context.ApplicationListener;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;
@@ -271,7 +270,7 @@ public class EnableJdbcAuditingHsqlIntegrationTests {
return new NamingStrategy() { return new NamingStrategy() {
public String getTableName(@NotNull Class<?> type) { public String getTableName(Class<?> type) {
return "DummyEntity"; return "DummyEntity";
} }
}; };

View File

@@ -23,7 +23,6 @@ import java.lang.reflect.Method;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.util.Properties; import java.util.Properties;
import org.jetbrains.annotations.NotNull;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
@@ -101,7 +100,6 @@ public class JdbcQueryMethodUnitTests {
} }
@NotNull
private JdbcQueryMethod createJdbcQueryMethod(String methodName) throws NoSuchMethodException { private JdbcQueryMethod createJdbcQueryMethod(String methodName) throws NoSuchMethodException {
Method method = JdbcQueryMethodUnitTests.class.getDeclaredMethod(methodName); Method method = JdbcQueryMethodUnitTests.class.getDeclaredMethod(methodName);

View File

@@ -21,7 +21,6 @@ import static org.mockito.Mockito.*;
import java.sql.ResultSet; import java.sql.ResultSet;
import org.assertj.core.api.Assertions; import org.assertj.core.api.Assertions;
import org.jetbrains.annotations.NotNull;
import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
@@ -80,7 +79,6 @@ public class StringBasedJdbcQueryUnitTests {
.execute(new Object[] {})); .execute(new Object[] {}));
} }
@NotNull
private StringBasedJdbcQuery createQuery() { private StringBasedJdbcQuery createQuery() {
StringBasedJdbcQuery query = new StringBasedJdbcQuery(queryMethod, operations, defaultRowMapper, converter); StringBasedJdbcQuery query = new StringBasedJdbcQuery(queryMethod, operations, defaultRowMapper, converter);