You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/11/03 18:58:00 UTC

[jira] [Commented] (BEAM-790) Validate PipelineOptions Default annotation

    [ https://issues.apache.org/jira/browse/BEAM-790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15633834#comment-15633834 ] 

ASF GitHub Bot commented on BEAM-790:
-------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-beam/pull/1159


> Validate PipelineOptions Default annotation
> -------------------------------------------
>
>                 Key: BEAM-790
>                 URL: https://issues.apache.org/jira/browse/BEAM-790
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-java-core
>            Reporter: Pei He
>            Assignee: Pei He
>             Fix For: 0.4.0-incubating
>
>
> It shouldn't allow @Override with @Default annotation, for example the following is broken:
> interface A {
>   @Default.Integer(1)
>   Integer getFoo();
>   void setFoo();
> }
> interface B extends A {
>   @Default.Integer(-1)
>   @Override
>   Integer getFoo();
> }
> It is broken, because PipelineOptions default values are lazily evaluated. And, it will depends on which one of the two following operations happen first:
> options.as(A.class) and options.as(B.class)
> If users want to change the default value, users should do setFoo(...) explicitly.
> It shouldn't allow adding Default annotation as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)