Skip to content

Commit

Permalink
Use JSpecify's @⁠Nullable on main
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrannen committed Feb 11, 2025
1 parent 18e31fc commit e78e802
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.util.Set;

import org.jspecify.annotations.Nullable;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
Expand All @@ -30,7 +31,6 @@
import org.springframework.expression.spel.support.StandardEvaluationContext;
import org.springframework.expression.spel.support.StandardTypeConverter;
import org.springframework.expression.spel.support.StandardTypeLocator;
import org.springframework.lang.Nullable;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
Expand Down Expand Up @@ -344,15 +344,13 @@ record ArrayHolder(String... array) {

static class ArrayHolderConverter implements GenericConverter {

@Nullable
@Override
public Set<ConvertiblePair> getConvertibleTypes() {
public @Nullable Set<ConvertiblePair> getConvertibleTypes() {
return Set.of(new ConvertiblePair(ArrayHolder.class, Object[].class));
}

@Nullable
@Override
public String[] convert(@Nullable Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
public @Nullable String[] convert(@Nullable Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
return ((ArrayHolder) source).array();
}
}
Expand Down

0 comments on commit e78e802

Please sign in to comment.