[
https://issues.apache.org/jira/browse/BEAM-790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15596590#comment-15596590
]
ASF GitHub Bot commented on BEAM-790:
-------------------------------------
Github user asfgit closed the pull request at:
https://github.com/apache/incubator-beam/pull/1151
> 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
>
> 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)