You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Kenneth Knowles (JIRA)" <ji...@apache.org> on 2019/01/08 23:19:00 UTC
[jira] [Updated] (BEAM-6277) KV#of parameters marked with
@Nullable, even though nullability is encapsulated in type variables KeyT
and ValueT
[ https://issues.apache.org/jira/browse/BEAM-6277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kenneth Knowles updated BEAM-6277:
----------------------------------
Summary: KV#of parameters marked with @Nullable, even though nullability is encapsulated in type variables KeyT and ValueT (was: KV#getValue is not marked with @Nullable, even though it can be null.)
> KV#of parameters marked with @Nullable, even though nullability is encapsulated in type variables KeyT and ValueT
> ------------------------------------------------------------------------------------------------------------------
>
> Key: BEAM-6277
> URL: https://issues.apache.org/jira/browse/BEAM-6277
> Project: Beam
> Issue Type: Bug
> Components: sdk-java-core
> Affects Versions: 2.8.0, 2.9.0
> Reporter: Jan Callewaert
> Priority: Minor
> Labels: starter
>
> On {{KV#getKey}}, there is the annotation {{@Nullable}}. That annotation is missing on {{KV#getValue}}, so I would assume that this means the value cannot be null. However, in {{KV#of}}, the parameter {{value}} is annotated with {{@Nullable}} and no further {{null}} checks are done.
> I would assume that {{KV#getValue}} should also be marked with {{@Nullable}}, or that the annotation {{@Nullable}} on the parameter {{value}} in the constructor and in {{KV#of}} should be removed.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)