Skip to content

Commit 5005b66

Browse files
Bump io.spring.nullability from 0.0.5 to 0.0.6 in the development-dependencies group (#4113)
* Bump io.spring.nullability in the development-dependencies group Bumps the development-dependencies group with 1 update: [io.spring.nullability](https://github.com/spring-gradle-plugins/nullability-plugin). Updates `io.spring.nullability` from 0.0.5 to 0.0.6 - [Release notes](https://github.com/spring-gradle-plugins/nullability-plugin/releases) - [Commits](spring-gradle-plugins/nullability-plugin@v0.0.5...v0.0.6) --- updated-dependencies: - dependency-name: io.spring.nullability dependency-version: 0.0.6 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: development-dependencies ... Signed-off-by: dependabot[bot] <[email protected]> * Fix NullAway errors for array element type annotations Change array field and getter annotations from @nullable element types to non-nullable element types to match constructor expectations. Arrays can still be null (reference nullable), but elements within those arrays must be non-null, consistent with varargs constructors that don't accept nullable elements. Signed-off-by: Soby Chacko <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Soby Chacko <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Soby Chacko <[email protected]>
1 parent bedf408 commit 5005b66

File tree

5 files changed

+8
-10
lines changed

5 files changed

+8
-10
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ plugins {
2121
id 'io.spring.nohttp' version '0.0.11'
2222
id 'io.spring.dependency-management' version '1.1.7' apply false
2323
id 'io.freefair.aggregate-javadoc' version '8.11'
24-
id 'io.spring.nullability' version '0.0.5' apply false
24+
id 'io.spring.nullability' version '0.0.6' apply false
2525
}
2626

2727
apply plugin: 'io.spring.nohttp'

spring-kafka/src/main/java/org/springframework/kafka/listener/AbstractMessageListenerContainer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ protected AbstractMessageListenerContainer(@Nullable ConsumerFactory<? super K,
157157
Assert.notNull(containerProperties, "'containerProperties' cannot be null");
158158
Assert.notNull(consumerFactory, "'consumerFactory' cannot be null");
159159
this.consumerFactory = (ConsumerFactory<K, V>) consumerFactory;
160-
@Nullable String @Nullable [] topics = containerProperties.getTopics();
160+
String @Nullable [] topics = containerProperties.getTopics();
161161
if (topics != null) {
162162
this.containerProperties = new ContainerProperties(topics);
163163
}
@@ -167,7 +167,7 @@ protected AbstractMessageListenerContainer(@Nullable ConsumerFactory<? super K,
167167
this.containerProperties = new ContainerProperties(topicPattern);
168168
}
169169
else {
170-
@Nullable TopicPartitionOffset @Nullable [] topicPartitions = containerProperties.getTopicPartitions();
170+
TopicPartitionOffset @Nullable [] topicPartitions = containerProperties.getTopicPartitions();
171171
if (topicPartitions != null) {
172172
this.containerProperties = new ContainerProperties(topicPartitions);
173173
}

spring-kafka/src/main/java/org/springframework/kafka/listener/AbstractShareKafkaMessageListenerContainer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ protected AbstractShareKafkaMessageListenerContainer(ShareConsumerFactory<? supe
9494
Assert.notNull(containerProperties, "'containerProperties' cannot be null");
9595
Assert.notNull(shareConsumerFactory, "'shareConsumerFactory' cannot be null");
9696
this.shareConsumerFactory = (ShareConsumerFactory<K, V>) shareConsumerFactory;
97-
@Nullable String @Nullable [] topics = containerProperties.getTopics();
97+
String @Nullable [] topics = containerProperties.getTopics();
9898
if (topics != null) {
9999
this.containerProperties = new ContainerProperties(topics);
100100
}
@@ -104,7 +104,7 @@ protected AbstractShareKafkaMessageListenerContainer(ShareConsumerFactory<? supe
104104
this.containerProperties = new ContainerProperties(topicPattern);
105105
}
106106
else {
107-
@Nullable TopicPartitionOffset @Nullable [] topicPartitions = containerProperties.getTopicPartitions();
107+
TopicPartitionOffset @Nullable [] topicPartitions = containerProperties.getTopicPartitions();
108108
if (topicPartitions != null) {
109109
this.containerProperties = new ContainerProperties(topicPartitions);
110110
}

spring-kafka/src/main/java/org/springframework/kafka/listener/ConsumerProperties.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class ConsumerProperties {
5252
/**
5353
* Topic names.
5454
*/
55-
private final @Nullable String @Nullable [] topics;
55+
private final String @Nullable [] topics;
5656

5757
/**
5858
* Topic pattern.
@@ -62,7 +62,7 @@ public class ConsumerProperties {
6262
/**
6363
* Topics/partitions/initial offsets.
6464
*/
65-
private final @Nullable TopicPartitionOffset @Nullable [] topicPartitions;
65+
private final TopicPartitionOffset @Nullable [] topicPartitions;
6666

6767
/**
6868
* The max time to block in the consumer waiting for records.
@@ -160,7 +160,6 @@ public ConsumerProperties(TopicPartitionOffset... topicPartitions) {
160160
* Return the configured topics.
161161
* @return the topics.
162162
*/
163-
@Nullable
164163
public String @Nullable [] getTopics() {
165164
return this.topics != null
166165
? Arrays.copyOf(this.topics, this.topics.length)
@@ -181,7 +180,6 @@ public Pattern getTopicPattern() {
181180
* @return the topics/partitions.
182181
* @since 2.5
183182
*/
184-
@Nullable
185183
public TopicPartitionOffset @Nullable [] getTopicPartitions() {
186184
return this.topicPartitions != null
187185
? Arrays.copyOf(this.topicPartitions, this.topicPartitions.length)

spring-kafka/src/main/java/org/springframework/kafka/retrytopic/ListenerContainerFactoryConfigurer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public class ListenerContainerFactoryConfigurer {
6262
@Nullable
6363
private BackOff providedBlockingBackOff;
6464

65-
private @Nullable Class<? extends Exception> @Nullable [] blockingExceptionTypes;
65+
private Class<? extends Exception> @Nullable [] blockingExceptionTypes;
6666

6767
private boolean retainStandardFatal;
6868

0 commit comments

Comments
 (0)