[
https://issues.apache.org/jira/browse/KAFKA-9234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18023727#comment-18023727
]
Adam commented on KAFKA-9234:
-----------------------------
Hi [~mjsax], I think I'm right in saying that using a checker like Spotbugs
would help Kafka maintainers avoiding NPEs, but using something like JSpecify
to annotate the code would help both Kafka maintainers and users.
I'm particularly interested because if the Kafka was annotated with
nullable/non-nullable it would make Kafka easier to use from Kotlin, because
Kotlin would be able to more accurately represent the nullability of the API
(without annotations on Java code Kotlin will just assume everything is
non-nullable).
> Consider using @Nullable and @Nonnull annotations
> -------------------------------------------------
>
> Key: KAFKA-9234
> URL: https://issues.apache.org/jira/browse/KAFKA-9234
> Project: Kafka
> Issue Type: Improvement
> Components: admin, clients, connect, consumer, producer , streams,
> streams-test-utils
> Reporter: Matthias J. Sax
> Assignee: Ganesh Sahu
> Priority: Minor
> Labels: beginner, newbie
>
> Java7 was dropped some time ago, and we might want to consider usein Java8
> `@Nullable` and `@Nonnull` annotations for all public facing APIsĀ instead of
> documenting it in JavaDocs only.
> This tickets should be broken down in a series of smaller PRs to keep the
> scope of each PR contained, allowing for more effective reviews.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)