Browse Source

Remove accidental `org.jetbrains:annotations` usage.

See spring-projects/spring-data-build#2670
pull/3386/head
Mark Paluch 2 months ago
parent
commit
26579e141d
No known key found for this signature in database
GPG Key ID: 55BC6374BAA9D973
  1. 4
      src/main/java/org/springframework/data/util/ReflectionUtils.java
  2. 4
      src/test/java/org/springframework/data/expression/ValueEvaluationUnitTests.java
  3. 2
      src/test/java/org/springframework/data/repository/core/support/RepositoryMethodInvokerUnitTests.java

4
src/main/java/org/springframework/data/util/ReflectionUtils.java

@ -27,7 +27,6 @@ import java.util.function.Predicate; @@ -27,7 +27,6 @@ import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.jetbrains.annotations.NotNull;
import org.jspecify.annotations.Nullable;
import org.springframework.core.KotlinDetector;
@ -287,8 +286,7 @@ public final class ReflectionUtils { @@ -287,8 +286,7 @@ public final class ReflectionUtils {
Assert.notNull(type, "Target type must not be null");
Assert.notNull(constructorArguments, "Constructor arguments must not be null");
for (@NotNull
Constructor<?> declaredConstructor : type.getDeclaredConstructors()) {
for (Constructor<?> declaredConstructor : type.getDeclaredConstructors()) {
if (argumentsMatch(declaredConstructor.getParameterTypes(), constructorArguments)) {
return (Constructor<T>) declaredConstructor;
}

4
src/test/java/org/springframework/data/expression/ValueEvaluationUnitTests.java

@ -19,7 +19,7 @@ import static org.assertj.core.api.Assertions.*; @@ -19,7 +19,7 @@ import static org.assertj.core.api.Assertions.*;
import java.util.Map;
import org.jetbrains.annotations.Nullable;
import org.jspecify.annotations.Nullable;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@ -49,7 +49,7 @@ public class ValueEvaluationUnitTests { @@ -49,7 +49,7 @@ public class ValueEvaluationUnitTests {
StandardEnvironment environment = new StandardEnvironment();
environment.getPropertySources().addFirst(propertySource);
record MyRecord(String foo, @org.jspecify.annotations.Nullable String bar) {
record MyRecord(String foo, @Nullable String bar) {
}

2
src/test/java/org/springframework/data/repository/core/support/RepositoryMethodInvokerUnitTests.java

@ -37,7 +37,6 @@ import java.util.stream.Stream; @@ -37,7 +37,6 @@ import java.util.stream.Stream;
import org.assertj.core.api.Assertions;
import org.assertj.core.data.Percentage;
import org.jetbrains.annotations.NotNull;
import org.jspecify.annotations.Nullable;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@ -356,7 +355,6 @@ class RepositoryMethodInvokerUnitTests { @@ -356,7 +355,6 @@ class RepositoryMethodInvokerUnitTests {
return CollectionUtils.lastElement(invocations);
}
@NotNull
@Override
public Iterator<RepositoryMethodInvocation> iterator() {
return invocations.iterator();

Loading…
Cancel
Save