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

8259530: Generated docs contain MIT/GPL-licenced works without reproducing the licence #1805

Closed
wants to merge 8 commits into from

Conversation

yukikimmura
Copy link
Contributor

@yukikimmura yukikimmura commented Mar 15, 2023

I would like to backport
JDK-8259530: Generated docs contain MIT/GPL-licenced works without reproducing the licence.
The original patch does not apply cleanly to 11u.
Because the original patch has switch expressions which can not be used in 11u,
and it has the Class jdk.javadoc.internal.doclets.formats.html.HtmlOptions which is not defined in 11u.
There is no risk, because the logic around the changes is the same as jdk17.
I confirmed the following test and all langtool tests.
test/langtools/jdk/javadoc/doclet/testLegalNotices/TestLegalNotices.java

Could anyone review the fix please?


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8259530: Generated docs contain MIT/GPL-licenced works without reproducing the licence

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk11u-dev.git pull/1805/head:pull/1805
$ git checkout pull/1805

Update a local copy of the PR:
$ git checkout pull/1805
$ git pull https://git.openjdk.org/jdk11u-dev.git pull/1805/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1805

View PR using the GUI difftool:
$ git pr show -t 1805

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk11u-dev/pull/1805.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 15, 2023

👋 Welcome back yukikimmura! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot changed the title Backport e9f3e325c274f19b0f6eceea2367708e3be689e9 8259530: Generated docs contain MIT/GPL-licenced works without reproducing the licence Mar 15, 2023
@openjdk
Copy link

openjdk bot commented Mar 15, 2023

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Mar 15, 2023
@mlbridge
Copy link

mlbridge bot commented Mar 15, 2023

Webrevs

Copy link
Member

@phohensee phohensee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In HtmlConfiguration.java, why not make legalNotices private and add the legalNotices() accessor as in the original commit?

@yukikimmura
Copy link
Contributor Author

Hello Paul,

Thank you for your advice.
In HtmlConfiguration.java, all variables for command line options are defined as public variable. For instance helpfile, stylesheetfile or createindex.
Should all variables make private, including legalnotices?

Thanks,
Kimura Yukihiro

Copy link
Member

@phohensee phohensee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're correct.

@openjdk
Copy link

openjdk bot commented Mar 16, 2023

@yukikimmura This change now passes all automated pre-integration checks.

After integration, the commit message for the final commit will be:

8259530: Generated docs contain MIT/GPL-licenced works without reproducing the licence

Reviewed-by: phh

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 18 new commits pushed to the master branch:

  • 835f2ca: 8291226: Create Test Cases to cover scenarios for JDK-8278067
  • d8993e6: 8291637: HttpClient default keep alive timeout not followed if server sends invalid value
  • e12516d: 8303102: jcmd: ManagementAgent.status truncates the text longer than O_BUFLEN
  • 88434e5: 8227257: javax/swing/JFileChooser/4847375/bug4847375.java fails with AssertionError
  • 75fb8a9: 8301170: perfMemory_windows.cpp add free_security_attr to early returns
  • 386addf: 8215575: C2 crash: assert(get_instanceKlass()->is_loaded()) failed: must be at least loaded
  • 1516012: 8300205: Swing test bug8078268 make latch timeout configurable
  • ab51b15: Merge
  • f1c92b4: 8304389: [11u] Crash on Windows in C2 compiled code after 8248238 and 8218431
  • f4776fe: 8302791: Add specific ClassLoader object to Proxy IllegalArgumentException message
  • ... and 8 more: https://git.openjdk.org/jdk11u-dev/compare/c6f00859fd555968e2c93d0633c82854a5fb5b8e...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@phohensee) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 16, 2023
@openjdk
Copy link

openjdk bot commented Mar 18, 2023

⚠️ @yukikimmura This pull request contains merges that bring in commits not present in the target repository. Since this is not a "merge style" pull request, these changes will be squashed when this pull request in integrated. If this is your intention, then please ignore this message. If you want to preserve the commit structure, you must change the title of this pull request to Merge <project>:<branch> where <project> is the name of another project in the OpenJDK organization (for example Merge jdk:master).

@yukikimmura
Copy link
Contributor Author

In the case of 17u,
variables about javadoc options are defined as PRIVATE variable in HtmlOptions.java and BaseOptions.java
On the other hand, variables about configurations are defined as PUBLIC variable in HtmlConfiguration.java and BaseConfiguration.java

In the case of 11u,
both variables about options and configurations are defined as public variables
in HtmlConfiguration.java and BaseConfiguration.java
I changed variables about javadoc options to private variables according to the latest JDK.

@yukikimmura
Copy link
Contributor Author

Hello Paul,

Thank you for your advice. I modified the fix.
I would appreciate if you could review it.

Thanks,
Kimura Yukihiro

1 similar comment
@yukikimmura
Copy link
Contributor Author

Hello Paul,

Thank you for your advice. I modified the fix.
I would appreciate if you could review it.

Thanks,
Kimura Yukihiro

@phohensee
Copy link
Member

Hi, Kimura.

I accepted your original fix after you corrected me. :) Your new update changes 101 files, which won't be approved by the Maintainers, so please revert to the original patch.

@yukikimmura
Copy link
Contributor Author

Hello Paul,

I reverted to the original pacth.

Thanks,
Kimura Yukihiro

Copy link
Member

@phohensee phohensee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

The backport has been approved in the JBS issue, so I can sponsor as soon as you add /integrate.

@yukikimmura
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Mar 31, 2023
@openjdk
Copy link

openjdk bot commented Mar 31, 2023

@yukikimmura
Your change (at version 228b691) is now ready to be sponsored by a Committer.

@phohensee
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Mar 31, 2023

Going to push as commit 3c8c45e.
Since your change was applied there have been 20 commits pushed to the master branch:

  • 6dedd8a: 8291638: Keep-Alive timeout of 0 should close connection immediately
  • 00b7647: 8275721: Name of UTC timezone in a locale changes depending on previous code
  • 835f2ca: 8291226: Create Test Cases to cover scenarios for JDK-8278067
  • d8993e6: 8291637: HttpClient default keep alive timeout not followed if server sends invalid value
  • e12516d: 8303102: jcmd: ManagementAgent.status truncates the text longer than O_BUFLEN
  • 88434e5: 8227257: javax/swing/JFileChooser/4847375/bug4847375.java fails with AssertionError
  • 75fb8a9: 8301170: perfMemory_windows.cpp add free_security_attr to early returns
  • 386addf: 8215575: C2 crash: assert(get_instanceKlass()->is_loaded()) failed: must be at least loaded
  • 1516012: 8300205: Swing test bug8078268 make latch timeout configurable
  • ab51b15: Merge
  • ... and 10 more: https://git.openjdk.org/jdk11u-dev/compare/c6f00859fd555968e2c93d0633c82854a5fb5b8e...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 31, 2023
@openjdk openjdk bot closed this Mar 31, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Mar 31, 2023
@openjdk
Copy link

openjdk bot commented Mar 31, 2023

@phohensee @yukikimmura Pushed as commit 3c8c45e.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@RealCLanger
Copy link
Contributor

RealCLanger commented Apr 3, 2023

Hi @yukikimmura, this backport has broken the bootcycle build with JDK10, due to the lack of Path.of in Java 10. (See the comments at https://bugs.openjdk.org/browse/JDK-8305385). Can you please fix this. Thanks!

@yukikimmura
Copy link
Contributor Author

yukikimmura commented Apr 4, 2023

Hello Christoph,

Thank you for your comment.
The problem was reproduced in my environment.
I'm investigating it, and below is the fix.

-                Path javaHome = Path.of(System.getProperty("java.home"));
+                Path javaHome = FileSystems.getDefault().getPath(System.getProperty("java.home"));

-                    legalNoticesDir = Path.of(legalNotices);
+                    legalNoticesDir = FileSystems.getDefault().getPath(legalNotices);

Can I reopen the pullrequest, or should I issue a new pullrequest?

@RealCLanger
Copy link
Contributor

Hi,

I created JBS issue JDK-8305528. You can open a PR with the fix against this bug. I can help to test/review it.

Cheers
Christoph

@pavelrappo
Copy link
Member

What are the reasons that the option type was changed from that of the original commit? In the original commit it was eXtended, in this backport it is standard.

@pavelrappo
Copy link
Member

What are the reasons that the option type was changed from that of the original commit? In the original commit it was eXtended, in this backport it is standard.

@yukikimmura, @RealCLanger, @phohensee, if there are no reasons for that change in option type, then I believe it should be reverted.

@RealCLanger
Copy link
Contributor

What are the reasons that the option type was changed from that of the original commit? In the original commit it was eXtended, in this backport it is standard.

@yukikimmura, @RealCLanger, @phohensee, if there are no reasons for that change in option type, then I believe it should be reverted.

@pavelrappo I was not involved in the review, I just discovered an issue with the test afterwards. However, I also can't see what exeactly you mean with the option type. Could you please elaborate this a bit more? Thanks

@pavelrappo
Copy link
Member

@pavelrappo I was not involved in the review, I just discovered an issue with the test afterwards. However, I also can't see what exeactly you mean with the option type. Could you please elaborate this a bit more? Thanks

In the original commit, the new option is defined like this:

new XOption(resources, "--legal-notices", 1)

In this backport, the new option is defined like this:

new Option(resources, "--legal-notices", 1)

@yukikimmura
Copy link
Contributor Author

To the best of my recollection, I didn't intentionally change "XOption" to "Option." I believe it's a bug.

@pavelrappo
Copy link
Member

To the best of my recollection, I didn't intentionally change "XOption" to "Option." I believe it's a bug.

While this backport could've used git range-diff or some other tool to catch that issue, the original bug could've also provided a better test.

Could you please publish a PR to fix the option type in jdk11u? Thanks.

@yukikimmura
Copy link
Contributor Author

Thank you for your comment and for pointing this out.
Yes, I will make this correction.
However, due to the long holiday in Japan, the office where I do my development work is closed,
which will cause a slight delay in starting work.

Thanks,
Kimura Yukihiro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants