-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[MJAVADOC-751] No warnings for localized output #206
[MJAVADOC-751] No warnings for localized output #206
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a test.
This might be a temporary workaround, but longer term I wonder if there's a non-command line way to invoke Javadoc these days.
How would one go about testing this? Do we execute a test that executes the javadoc executable and check wether the output is english? There would also have to be a german/japanese/chinese environment to execute this test in as doing so in only english environments seems redundant.
In Java 8 it should be as easy as: javax.tools.ToolProvider.getSystemDocumentationTool().run(in, out, err, args) And in Java 9+: java.util.spi.ToolProvider.getSystemDocumentationTool().run(in, out, err, args); But if we do that than we cannot influence the output locale anymore as it will always use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use -locale
or use -J-D
and so forth?
I can confirm that
with flag set:
|
I have a potential fix. NEeds to be a separate issue. Unfortunately, there is not standard way to fix this. |
Superseded by #298. |
Thank you very much for fixing this! |
This PR offers a solution for ticket MJAVADOC-751.
When parsing the output of the javadoc executable the english locale is expected (see containsWarnings and isInformationalOutput). In order for these checks to work the locale should be forced to english.
Following this checklist to help us incorporate your
contribution quickly and easily:
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes.
[MJAVADOC-XXX] - Fixes bug in ApproximateQuantiles
,where you replace
MJAVADOC-XXX
with the appropriate JIRA issue. Best practiceis to use the JIRA issue title in the pull request title and in the first line of the
commit message.
mvn clean verify -Prun-its
to make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.
I hereby declare this contribution to be licensed under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.