Skip to content

Commit bc3e6ab

Browse files
committed
Switch to jspecify nullability annotations.
Original Pull Request #3065 Closes #2984 Signed-off-by: Peter-Josef Meisch <[email protected]>
1 parent 9d5cbdc commit bc3e6ab

File tree

299 files changed

+707
-767
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

299 files changed

+707
-767
lines changed

src/main/antora/modules/ROOT/pages/elasticsearch/auditing.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ In order for the auditing code to be able to decide whether an entity instance i
1010
----
1111
package org.springframework.data.domain;
1212
13-
import org.springframework.lang.Nullable;
13+
import org.jspecify.annotations.Nullable;
1414
1515
public interface Persistable<ID> {
1616
@Nullable
@@ -81,5 +81,5 @@ class MyConfiguration {
8181
}
8282
----
8383

84-
If your code contains more than one `AuditorAware` bean for different types, you must provide the name of the bean to use as an argument to the `auditorAwareRef` parameter of the
85-
`@EnableElasticsearchAuditing` annotation.
84+
If your code contains more than one `AuditorAware` bean for different types, you must provide the name of the bean to use as an argument to the `auditorAwareRef` parameter of the
85+
`@EnableElasticsearchAuditing` annotation.

src/main/antora/modules/ROOT/pages/elasticsearch/scripted-and-runtime-fields.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ Whereas the birthdate is fix, the age depends on the time when a query is issued
2020
====
2121
[source,java]
2222
----
23+
import org.jspecify.annotations.Nullable;
2324
import org.springframework.data.annotation.Id;
2425
import org.springframework.data.elasticsearch.annotations.DateFormat;
2526
import org.springframework.data.elasticsearch.annotations.Document;
2627
import org.springframework.data.elasticsearch.annotations.Field;
2728
import org.springframework.data.elasticsearch.annotations.ScriptedField;
28-
import org.springframework.lang.Nullable;
2929
3030
import java.time.LocalDate;
3131
import java.time.format.DateTimeFormatter;

src/main/java/org/springframework/data/elasticsearch/ElasticsearchErrorCause.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,18 @@
1515
*/
1616
package org.springframework.data.elasticsearch;
1717

18-
import org.springframework.lang.Nullable;
19-
2018
import java.util.List;
2119

20+
import org.jspecify.annotations.Nullable;
21+
2222
/**
2323
* Object describing an Elasticsearch error
2424
*
2525
* @author Peter-Josef Meisch
2626
* @since 4.4
2727
*/
2828
public class ElasticsearchErrorCause {
29-
@Nullable
30-
private final String type;
29+
@Nullable private final String type;
3130

3231
private final String reason;
3332

src/main/java/org/springframework/data/elasticsearch/UncategorizedElasticsearchException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
*/
1616
package org.springframework.data.elasticsearch;
1717

18+
import org.jspecify.annotations.Nullable;
1819
import org.springframework.dao.UncategorizedDataAccessException;
19-
import org.springframework.lang.Nullable;
2020

2121
/**
2222
* @author Peter-Josef Meisch
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
@org.springframework.lang.NonNullApi
2-
@org.springframework.lang.NonNullFields
1+
@org.jspecify.annotations.NullMarked
32
package org.springframework.data.elasticsearch.annotations;

src/main/java/org/springframework/data/elasticsearch/aot/SpringDataElasticsearchRuntimeHints.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import java.util.Arrays;
2121

22+
import org.jspecify.annotations.Nullable;
2223
import org.springframework.aot.hint.MemberCategory;
2324
import org.springframework.aot.hint.RuntimeHints;
2425
import org.springframework.aot.hint.RuntimeHintsRegistrar;
@@ -32,7 +33,6 @@
3233
import org.springframework.data.elasticsearch.core.event.ReactiveAfterLoadCallback;
3334
import org.springframework.data.elasticsearch.core.event.ReactiveAfterSaveCallback;
3435
import org.springframework.data.elasticsearch.core.event.ReactiveBeforeConvertCallback;
35-
import org.springframework.lang.Nullable;
3636

3737
/**
3838
* @author Peter-Josef Meisch
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
@org.springframework.lang.NonNullApi
2-
@org.springframework.lang.NonNullFields
1+
@org.jspecify.annotations.NullMarked
32
package org.springframework.data.elasticsearch.aot;

src/main/java/org/springframework/data/elasticsearch/client/ClientConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
import javax.net.ssl.HostnameVerifier;
2626
import javax.net.ssl.SSLContext;
2727

28+
import org.jspecify.annotations.Nullable;
2829
import org.springframework.data.elasticsearch.support.HttpHeaders;
29-
import org.springframework.lang.Nullable;
3030

3131
/**
3232
* Configuration interface exposing common client configuration properties for Elasticsearch clients.

src/main/java/org/springframework/data/elasticsearch/client/ClientConfigurationBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
import javax.net.ssl.HostnameVerifier;
2626
import javax.net.ssl.SSLContext;
2727

28+
import org.jspecify.annotations.Nullable;
2829
import org.springframework.data.elasticsearch.client.ClientConfiguration.ClientConfigurationBuilderWithRequiredEndpoint;
2930
import org.springframework.data.elasticsearch.client.ClientConfiguration.MaybeSecureClientConfigurationBuilder;
3031
import org.springframework.data.elasticsearch.client.ClientConfiguration.TerminalClientConfigurationBuilder;
3132
import org.springframework.data.elasticsearch.support.HttpHeaders;
32-
import org.springframework.lang.Nullable;
3333
import org.springframework.util.Assert;
3434

3535
/**

src/main/java/org/springframework/data/elasticsearch/client/DefaultClientConfiguration.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@
2424
import javax.net.ssl.HostnameVerifier;
2525
import javax.net.ssl.SSLContext;
2626

27-
import org.elasticsearch.client.RestClientBuilder.HttpClientConfigCallback;
27+
import org.jspecify.annotations.Nullable;
2828
import org.springframework.data.elasticsearch.support.HttpHeaders;
29-
import org.springframework.lang.Nullable;
3029

3130
/**
3231
* Default {@link ClientConfiguration} implementation.

0 commit comments

Comments
 (0)