You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Scott Wegner (JIRA)" <ji...@apache.org> on 2018/05/02 20:25:01 UTC
[jira] [Commented] (BEAM-4227) Hidden annotation does not hide
methods from help text
[ https://issues.apache.org/jira/browse/BEAM-4227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16461586#comment-16461586 ]
Scott Wegner commented on BEAM-4227:
------------------------------------
FYI, this was discussed a bit on [Slack|https://the-asf.slack.com/archives/C9H0YNP3P/p1525286101000561].
> Hidden annotation does not hide methods from help text
> ------------------------------------------------------
>
> Key: BEAM-4227
> URL: https://issues.apache.org/jira/browse/BEAM-4227
> Project: Beam
> Issue Type: Bug
> Components: sdk-java-core
> Affects Versions: 2.4.0
> Reporter: Paul Gerver
> Assignee: Kenneth Knowles
> Priority: Minor
>
> The javadoc for *@Hidden* mentions that it hides methods and/or interfaces, but the filtering of *@Hidden* for *--help* only works for interfaces while methods with the annotation are still visible.
>
> For example, in *PipelineOptions* the optionsId getter is set with the *Hidden* annotation, but when *–help* is executed, it appears in the list:
> {noformat}
> org.apache.beam.sdk.options.PipelineOptions:
> --jobName=<String>
> Default: JobNameFactory
> Name of the pipeline execution.It must match the regular expression
> '[a-z]([-a-z0-9]{0,38}[a-z0-9])?'.It defaults to
> ApplicationName-UserName-Date-RandomInteger
> --optionsId=<long>
> Default: AtomicLongFactory
> ...
> --userAgent=<String>
> Default: UserAgentFactory
> ...{noformat}
> A proper fix should be skip methods marked with the Hidden class when performing print help [1]. Additionally, a test should be added to *PipelineOptionsReflectorTest* [2] or factory test.
> [1] [https://github.com/apache/beam/blob/19bdad654550958f5749ebfcedc3981240127b05/sdks/java/core/src/main/java/org/apache/beam/sdk/options/PipelineOptionsFactory.java#L581]
> [2] [https://github.com/apache/beam/blob/48f9cce76cf87ffe7073c3ad9c34a9f2f6de4b76/sdks/java/core/src/test/java/org/apache/beam/sdk/options/PipelineOptionsReflectorTest.java#L120]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)