-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JXR-110] Use equivalent css/images of javadoc #10
Conversation
{ | ||
javadocTemplatesVersion = JavaVersion.parse( javadocVersion ); | ||
} | ||
catch ( NumberFormatException e ) |
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 exception will never occur (here). JavaVersion.parse()
is a lazy evaluator. Only during comparison the value is evaluated. The evaluator is also aware of dashes, underscores and classifiers like ea
.
Hence this method will never throw an exception.
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.
Ah, true :-) This is a copy'n'paste error from AbstractJavadocMojo ;-)
private void setJavadocTemplatesVersion() | ||
throws MavenReportException | ||
{ | ||
JavaVersion javaVersion = JavaVersion.JAVA_SPECIFICATION_VERSION; |
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.
For Java 7: java.specification.version=1.7
This is not in line with the parameter, which says Version of the Javadoc templates to use, ex. "4", "5" etc.
Since this is a returning issue, I should also think of a proper solution for it in plexus-java.
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.
So, I revert to using the "1.x" scheme instead for now
It looks like you have made accidentally a merge into your branch instead of rebasing it against master... |
*/ | ||
private String getTemplateDir() | ||
throws MavenReportException |
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.
I don't see the reason for this exception. Looking at https://github.com/codehaus-plexus/plexus-languages/blob/master/plexus-java/src/main/java/org/codehaus/plexus/languages/java/version/JavaVersion.java#L71 I can't find a way to get a NumberFormatException
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.
Nope, you've got a point. The Integer.parseInt() could throw an exception, but the regex matcher ensures the string is all digits :-)
@@ -156,7 +156,7 @@ | |||
private boolean linkJavadoc; | |||
|
|||
/** | |||
* Version of the Javadoc templates to use, ex. "4", "5" etc. | |||
* Version of the Javadoc templates to use, ex. "1.4", "1.5" etc. |
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.
Let's be more explicit here. The value should reflect java.specification.version
, "1.4", "1.8", "9", "10", by default this system property is used.
This closes apache#10
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.
[JXR-XXX] - Fixes bug in ApproximateQuantiles
,where you replace
JXR-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
to make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
mvn -Prun-its clean verify
).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 licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.