You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please annotate the API, including return types and parameters, with @javax.annotations.NonNull or @javax.annotations.Nullable as appropriate so that users of the API know what can and can't be null.
Use case
My use case is when using jnats from kotlin, but it applies to any user of jnats. For example, I discovered that io.nats.client.api.KeyValueEntry has a method
public byte[] getValue() {
return value;
}
that allows for the returned byte[] to be null. Kotlin builds nullability into the type system for compile-time checking, and if Java APIs include these annotations, the kotlin compiler can inform the developer better about nullability.
Contribution
No response
The text was updated successfully, but these errors were encountered:
Proposed change
Please annotate the API, including return types and parameters, with
@javax.annotations.NonNull
or@javax.annotations.Nullable
as appropriate so that users of the API know what can and can't benull
.Use case
My use case is when using
jnats
from kotlin, but it applies to any user ofjnats
. For example, I discovered thatio.nats.client.api.KeyValueEntry
has a methodthat allows for the returned
byte[]
to benull.
Kotlin builds nullability into the type system for compile-time checking, and if Java APIs include these annotations, the kotlin compiler can inform the developer better about nullability.Contribution
No response
The text was updated successfully, but these errors were encountered: