Skip to content

Commit 8ad2e8e

Browse files
authored
nullability-fixes
Closes #3282 Signed-off-by: Peter-Josef Meisch <pj.meisch@sothawo.com>
1 parent 795e1ef commit 8ad2e8e

202 files changed

Lines changed: 2401 additions & 847 deletions

File tree

Some content is hidden

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

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

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

18-
import org.springframework.dao.DataRetrievalFailureException;
19-
2018
import java.util.Map;
2119

20+
import org.jspecify.annotations.Nullable;
21+
import org.springframework.dao.DataRetrievalFailureException;
22+
2223
/**
2324
* @author Peter-Josef Meisch
2425
* @author Illia Ulianov
@@ -42,6 +43,6 @@ public Map<String, FailureDetails> getFailedDocuments() {
4243
* @author Illia Ulianov
4344
* @since 5.2
4445
*/
45-
public record FailureDetails(Integer status, String errorMessage) {
46+
public record FailureDetails(Integer status, @Nullable String errorMessage) {
4647
}
4748
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
public class ElasticsearchErrorCause {
2929
@Nullable private final String type;
3030

31-
private final String reason;
31+
@Nullable private final String reason;
3232

3333
@Nullable private final String stackTrace;
3434

@@ -38,7 +38,7 @@ public class ElasticsearchErrorCause {
3838

3939
private final List<ElasticsearchErrorCause> suppressed;
4040

41-
public ElasticsearchErrorCause(@Nullable String type, String reason, @Nullable String stackTrace,
41+
public ElasticsearchErrorCause(@Nullable String type, @Nullable String reason, @Nullable String stackTrace,
4242
@Nullable ElasticsearchErrorCause causedBy, List<ElasticsearchErrorCause> rootCause,
4343
List<ElasticsearchErrorCause> suppressed) {
4444
this.type = type;
@@ -54,7 +54,7 @@ public String getType() {
5454
return type;
5555
}
5656

57-
public String getReason() {
57+
public @Nullable String getReason() {
5858
return reason;
5959
}
6060

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,18 @@
1+
/*
2+
* Copyright 2022-present the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
@org.jspecify.annotations.NullMarked
218
package org.springframework.data.elasticsearch.annotations;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,18 @@
1+
/*
2+
* Copyright 2022-present the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
@org.jspecify.annotations.NullMarked
218
package org.springframework.data.elasticsearch.aot;

0 commit comments

Comments
 (0)