Github user rmetzger commented on the pull request:
https://github.com/apache/flink/pull/1097#issuecomment-158121645
I think the test cases are not good enough.
I tried it out with this code again:
```java
RequiredParameters rq = new RequiredParameters();
rq.add("input");
rq.add(new
Option("parallelism").alt("p").defaultValue("1").type(OptionType.INTEGER));
ParameterTool pt = ParameterTool.fromArgs(args);
rq.applyTo(pt);
```
and got the following error:
```
Exception in thread "main"
org.apache.flink.api.java.utils.RequiredParametersException: Value null is not
in the list of valid choices
at
org.apache.flink.api.java.utils.RequiredParameters.applyTo(RequiredParameters.java:126)
at
org.apache.flink.examples.java.wordcount.WordCount.main(WordCount.java:64)
```
Passing `--input abc` will result in `RequiredParametersException: Value
abc is not in the list of valid choices`.
The output of the help method looks better now
```
Required Parameters:
--input
-p, --parallelism Set a parallelism for the job default: 1
--ouput This is my help
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---