Skip to content

Commit 550bec5

Browse files
schaudermp911de
authored andcommitted
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.
1 parent 3edfa51 commit 550bec5

7 files changed

+1
-16
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
import java.util.List;
2727

28-
import org.jetbrains.annotations.NotNull;
2928
import org.junit.jupiter.api.Test;
3029
import org.springframework.data.annotation.Id;
3130
import org.springframework.data.annotation.Version;
@@ -134,12 +133,10 @@ PersistentPropertyPathExtension toPathExt(String path) {
134133
return new PersistentPropertyPathExtension(context, getPersistentPropertyPath(path));
135134
}
136135

137-
@NotNull
138136
PersistentPropertyPath<RelationalPersistentProperty> getPersistentPropertyPath(String propertyName) {
139137
return context.getPersistentPropertyPath(propertyName, DummyEntity.class);
140138
}
141139

142-
@NotNull
143140
Identifier createBackRef() {
144141
return JdbcIdentifierBuilder.forBackReferences(converter, toPathExt("content"), 23L).build();
145142
}

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import java.util.ArrayList;
2323
import java.util.List;
2424

25-
import org.jetbrains.annotations.NotNull;
2625
import org.junit.jupiter.api.Test;
2726
import org.springframework.data.annotation.Id;
2827
import org.springframework.data.annotation.Version;
@@ -148,12 +147,10 @@ PersistentPropertyPathExtension toPathExt(String path) {
148147
return new PersistentPropertyPathExtension(context, getPersistentPropertyPath(path));
149148
}
150149

151-
@NotNull
152150
PersistentPropertyPath<RelationalPersistentProperty> getPersistentPropertyPath(String propertyName) {
153151
return context.getPersistentPropertyPath(propertyName, DummyEntity.class);
154152
}
155153

156-
@NotNull
157154
Identifier createBackRef() {
158155
return JdbcIdentifierBuilder.forBackReferences(converter, toPathExt("content"), 23L).build();
159156
}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import java.util.HashMap;
3232
import java.util.List;
3333

34-
import org.jetbrains.annotations.NotNull;
3534
import org.junit.jupiter.api.BeforeEach;
3635
import org.junit.jupiter.api.Test;
3736
import org.mockito.ArgumentCaptor;
@@ -192,7 +191,6 @@ public void considersConfiguredWriteConverterForIdValueObjectsWhichReferencedInO
192191
assertThat(paramSourceCaptor.getValue().getValue("DUMMYENTITYROOT")).isEqualTo(rawId);
193192
}
194193

195-
@NotNull
196194
private DefaultDataAccessStrategy createAccessStrategyWithConverter(List<?> converters) {
197195
DelegatingDataAccessStrategy relationResolver = new DelegatingDataAccessStrategy();
198196

spring-data-jdbc/src/test/java/org/springframework/data/jdbc/core/mapping/PersistentPropertyPathTestUtils.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
import lombok.experimental.UtilityClass;
1919

20-
import org.jetbrains.annotations.NotNull;
2120
import org.springframework.data.mapping.PersistentPropertyPath;
2221
import org.springframework.data.relational.core.mapping.RelationalMappingContext;
2322
import org.springframework.data.relational.core.mapping.RelationalPersistentProperty;
@@ -28,7 +27,6 @@
2827
@UtilityClass
2928
public class PersistentPropertyPathTestUtils {
3029

31-
@NotNull
3230
public static PersistentPropertyPath<RelationalPersistentProperty> getPath(RelationalMappingContext context,
3331
String path, Class<?> baseType) {
3432

spring-data-jdbc/src/test/java/org/springframework/data/jdbc/repository/config/EnableJdbcAuditingHsqlIntegrationTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import java.util.function.Consumer;
2727

2828
import org.assertj.core.api.SoftAssertions;
29-
import org.jetbrains.annotations.NotNull;
3029
import org.junit.jupiter.api.Test;
3130
import org.springframework.context.ApplicationListener;
3231
import org.springframework.context.ConfigurableApplicationContext;
@@ -271,7 +270,7 @@ NamingStrategy namingStrategy() {
271270

272271
return new NamingStrategy() {
273272

274-
public String getTableName(@NotNull Class<?> type) {
273+
public String getTableName(Class<?> type) {
275274
return "DummyEntity";
276275
}
277276
};

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
import java.sql.ResultSet;
2424
import java.util.Properties;
2525

26-
import org.jetbrains.annotations.NotNull;
2726
import org.junit.jupiter.api.BeforeEach;
2827
import org.junit.jupiter.api.Test;
2928

@@ -101,7 +100,6 @@ public void returnsSpecifiedSqlStatementIfNameAndValueAreGiven() throws NoSuchMe
101100

102101
}
103102

104-
@NotNull
105103
private JdbcQueryMethod createJdbcQueryMethod(String methodName) throws NoSuchMethodException {
106104

107105
Method method = JdbcQueryMethodUnitTests.class.getDeclaredMethod(methodName);

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import java.sql.ResultSet;
2222

2323
import org.assertj.core.api.Assertions;
24-
import org.jetbrains.annotations.NotNull;
2524
import org.junit.jupiter.api.BeforeEach;
2625
import org.junit.jupiter.api.Test;
2726

@@ -80,7 +79,6 @@ public void emptyQueryThrowsException() {
8079
.execute(new Object[] {}));
8180
}
8281

83-
@NotNull
8482
private StringBasedJdbcQuery createQuery() {
8583

8684
StringBasedJdbcQuery query = new StringBasedJdbcQuery(queryMethod, operations, defaultRowMapper, converter);

0 commit comments

Comments
 (0)