You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/04 22:47:34 UTC

[GitHub] [beam] damccorm opened a new issue, #21363: PipelineOptions getters can produce null even if not annotated Nullable when no Default is specified

damccorm opened a new issue, #21363:
URL: https://github.com/apache/beam/issues/21363

   Context: BEAM-13537, https://github.com/apache/beam/pull/16625#discussion_r793021931
   
   PipelineOptions getters without Default specified can produce null, but because it happens in generated code, the null checker will not complain about it. Is there some way we can make sure getters without a Default are always Nullable? 
   
   Imported from Jira [BEAM-13758](https://issues.apache.org/jira/browse/BEAM-13758). Original Jira may contain additional context.
   Reported by: bhulette.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] mga44 commented on issue #21363: PipelineOptions getters can produce null even if not annotated Nullable when no Default is specified

Posted by "mga44 (via GitHub)" <gi...@apache.org>.
mga44 commented on issue #21363:
URL: https://github.com/apache/beam/issues/21363#issuecomment-1703305932

   There seems to be no simple way to ensure that getters without the `@Default` annotation wouldn't produce `null`.
   
   From my understanding, the best way to approach this issue would be to manually add either `@Required` or `@Nullable` annotations to unannotated getters in existing `PipelineOptions` implementations to warn potential users or raise exceptions during validation. Annotating getters in custom `PipelineOptions` implementations would be the responsibility of users.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] mga44 commented on issue #21363: PipelineOptions getters can produce null even if not annotated Nullable when no Default is specified

Posted by "mga44 (via GitHub)" <gi...@apache.org>.
mga44 commented on issue #21363:
URL: https://github.com/apache/beam/issues/21363#issuecomment-1637390064

   .take-issue


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org