Skip to content

Commit 73a44d1

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 3c6ee04 commit 73a44d1

File tree

5 files changed

+1
-12
lines changed

5 files changed

+1
-12
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.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.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/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.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.Before;
2827
import org.junit.Test;
2928

@@ -98,7 +97,6 @@ public void returnsSpecifiedSqlStatementIfNameAndValueAreGiven() throws NoSuchMe
9897

9998
}
10099

101-
@NotNull
102100
private JdbcQueryMethod createJdbcQueryMethod(String methodName) throws NoSuchMethodException {
103101

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

0 commit comments

Comments
 (0)