Browse Source

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.
pull/1035/head
Jens Schauder 5 years ago committed by Mark Paluch
parent
commit
550bec5a0c
No known key found for this signature in database
GPG Key ID: 4406B84C1661DCD1
  1. 3
      spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/JdbcAggregateChangeExecutorContextImmutableUnitTests.java
  2. 3
      spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/JdbcAggregateChangeExecutorContextUnitTests.java
  3. 2
      spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/convert/DefaultDataAccessStrategyUnitTests.java
  4. 2
      spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/mapping/PersistentPropertyPathTestUtils.java
  5. 3
      spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/config/EnableJdbcAuditingHsqlIntegrationTests.java
  6. 2
      spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/query/JdbcQueryMethodUnitTests.java
  7. 2
      spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/query/StringBasedJdbcQueryUnitTests.java

3
spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/JdbcAggregateChangeExecutorContextImmutableUnitTests.java

@ -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();
} }

3
spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/JdbcAggregateChangeExecutorContextUnitTests.java

@ -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();
} }

2
spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/convert/DefaultDataAccessStrategyUnitTests.java

@ -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();

2
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 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) {

3
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 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";
} }
}; };

2
spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/query/JdbcQueryMethodUnitTests.java

@ -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);

2
spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/query/StringBasedJdbcQueryUnitTests.java

@ -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);

Loading…
Cancel
Save