Skip to content
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

Merged
merged 15 commits into from
Sep 21, 2018

Conversation

judby
Copy link
Contributor

@judby judby commented Aug 26, 2018

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Make sure there is a JIRA issue filed
    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.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [JXR-XXX] - Fixes bug in ApproximateQuantiles,
    where you replace JXR-XXX with the appropriate JIRA issue. Best practice
    is to use the JIRA issue title in the pull request title and in the first line of the
    commit message.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will
    be performed on your pull request automatically.
  • You have run the integration tests successfully (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.

{
javadocTemplatesVersion = JavaVersion.parse( javadocVersion );
}
catch ( NumberFormatException e )
Copy link
Contributor

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.

Copy link
Contributor Author

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;
Copy link
Contributor

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.

Copy link
Contributor Author

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

@khmarbaise
Copy link
Member

It looks like you have made accidentally a merge into your branch instead of rebasing it against master...

*/
private String getTemplateDir()
throws MavenReportException
Copy link
Contributor

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

Copy link
Contributor Author

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.
Copy link
Contributor

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.

@rfscholte rfscholte merged commit fb8790d into apache:master Sep 21, 2018
pzygielo pushed a commit to pzygielo/maven-jxr that referenced this pull request Aug 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants