Skip to content

8332072: Convert package.html files in java.naming to package-info.java #19529

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

Closed
wants to merge 6 commits into from

Conversation

nizarbenalla
Copy link
Member

@nizarbenalla nizarbenalla commented Jun 3, 2024

Can I please get a review for this small change? The motivation is that javac does not recognize package.html files.

The conversion was simple, I used a script to rename the files, append "*" on the left and remove some HTML tags like <body> and <html>. I did the conversion in place, renaming them in git but with the big amount of change git thinks it's a new file.

I also added a new package-info.java file to javax.naming.ldap.spi. I hope that's fine.


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

Issues

  • JDK-8332072: Convert package.html files in java.naming to package-info.java (Sub-task - P4)
  • JDK-8335213: Code snippet in javax.naming.ldap package summary does not compile (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19529/head:pull/19529
$ git checkout pull/19529

Update a local copy of the PR:
$ git checkout pull/19529
$ git pull https://git.openjdk.org/jdk.git pull/19529/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 19529

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19529.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 3, 2024

👋 Welcome back nbenalla! 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
Copy link

openjdk bot commented Jun 3, 2024

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

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

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

8332072: Convert package.html files in `java.naming` to package-info.java
8335213: Code snippet in javax.naming.ldap package summary does not compile

Reviewed-by: aefimov

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 93 new commits pushed to the master branch:

  • 5a8af2b: 8335615: Clean up left-overs from 8317721
  • 6923a51: 8335607: Serial: Remove unused collection_attempt_is_safe
  • 5866b16: 8335411: RISC-V: Optimize encode_heap_oop when oop is not null
  • 6db4c6a: 8335536: Fix assertion failure in IdealGraphPrinter when append is true
  • 350f9c1: 8322812: Manpage for jcmd is missing JFR.view command
  • c06b75f: 8335591: Fix -Wzero-as-null-pointer-constant warnings in ConcurrentHashTable
  • 6c84e9c: 8335544: Serial: Remove unused _should_allocate_from_space
  • 4d2f737: 8335357: Delete HotSpotJDKReflection.oopSizeOffset
  • 77a7078: 8335593: Fix -Wzero-as-null-pointer-constant warning in Type_Array ctor
  • f3f90dc: 8335592: Fix -Wzero-as-null-pointer-constant warnings in RootNode ctor
  • ... and 83 more: https://git.openjdk.org/jdk/compare/4ce8822b6c53b8bd72713f1bfaf6673b91aabea4...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 (@AlekseiEfimov) 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 changed the title 8332072 Convert package.html files in java.naming to package-info.java 8332072: Convert package.html files in java.naming to package-info.java Jun 3, 2024
@openjdk
Copy link

openjdk bot commented Jun 3, 2024

@nizarbenalla The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Jun 3, 2024
@nizarbenalla nizarbenalla marked this pull request as ready for review June 3, 2024 18:01
@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 3, 2024
@mlbridge
Copy link

mlbridge bot commented Jun 3, 2024

Webrevs

@jddarcy
Copy link
Member

jddarcy commented Jun 3, 2024

I recommend having the new package-info.java files follow the now-current javadoc conventions including:

  • Using {@code foo} in preference to <code>foo</code>
  • Using the @snippet tag in preference to <blockquore><pre>
  • etc.

@nizarbenalla
Copy link
Member Author

Sure, I will do it for this one.

@nizarbenalla nizarbenalla marked this pull request as draft June 6, 2024 10:11
@openjdk openjdk bot removed the rfr Pull request is ready for review label Jun 6, 2024
Copy link
Member Author

@nizarbenalla nizarbenalla left a comment

Choose a reason for hiding this comment

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

I have converted this to use some of the now-current javadoc convetions.

* // Perform update
* Context ctx = ectx.createSubsubcontext("cn=newobj");
*
* // Get response controls
* Control[] respCtls = ectx.getResponseControls();
* if (respCtls != null) {
* // Find the one we want
* for (int i = 0; i &lt; respCtls; i++) {
* for (int i = 0; i < respCtls.length; i++) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is the only change that isn't a direct 1:1 conversion, I hope this ok.

Copy link
Contributor

Choose a reason for hiding this comment

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

This seems reasonable for what is an obvious but minor bug

Copy link
Member

Choose a reason for hiding this comment

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

The change looks correct to me too.

@nizarbenalla nizarbenalla marked this pull request as ready for review June 26, 2024 18:08
@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 26, 2024
@nizarbenalla
Copy link
Member Author

/solves JDK-8335213

@openjdk
Copy link

openjdk bot commented Jun 26, 2024

@nizarbenalla
Adding additional issue to solves list: 8335213: Fix code snippet in javax.naming.ldap package summary.

Comment on lines 28 to 29
* Extends the {@code javax.naming.ldap} package to provide the classes
* and interfaces for the Service Provider Interface (SPI) for LDAP
Copy link
Member

Choose a reason for hiding this comment

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

The javax.naming.ldap.spi package only contains SPI classes that can customize DNS lookups when performing LDAP operations. It was added by JDK-8160768/CSR.
Since the package only contains classes related to this SPI maybe we could change the wording to something like this:

Suggested change
* Extends the {@code javax.naming.ldap} package to provide the classes
* and interfaces for the Service Provider Interface (SPI) for LDAP
* Provides the Service Provider Interface for DNS lookups when
* performing LDAP operations.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, Fixed in 0104e4a

* // Perform update
* Context ctx = ectx.createSubsubcontext("cn=newobj");
*
* // Get response controls
* Control[] respCtls = ectx.getResponseControls();
* if (respCtls != null) {
* // Find the one we want
* for (int i = 0; i &lt; respCtls; i++) {
* for (int i = 0; i < respCtls.length; i++) {
Copy link
Member

Choose a reason for hiding this comment

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

The change looks correct to me too.

Copy link
Member

@AlekseiEfimov AlekseiEfimov left a comment

Choose a reason for hiding this comment

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

Package descriptions generated from new package-info.java files look good and have the same content as the ones generated from package.html files. A minor issue - two leftover tags need to be removed:

* <p>
* An application, for example, can register its interest in changes to
* objects in a context as follows:
* <blockquote>
Copy link
Member

Choose a reason for hiding this comment

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

The leftover <blockquote> can be removed:

Suggested change
* <blockquote>

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed both in 657ef5c, thank you.

* }
* }
* }
* </blockquote>
Copy link
Member

Choose a reason for hiding this comment

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

The leftover </blockquote> can be removed:

Suggested change
* </blockquote>

Copy link
Member

@AlekseiEfimov AlekseiEfimov left a comment

Choose a reason for hiding this comment

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

The latest changes look good to me

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jul 3, 2024
@nizarbenalla
Copy link
Member Author

Thank you Aleksei for your review!

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Jul 3, 2024
@openjdk
Copy link

openjdk bot commented Jul 3, 2024

@nizarbenalla
Your change (at version 657ef5c) is now ready to be sponsored by a Committer.

@AlekseiEfimov
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Jul 4, 2024

Going to push as commit 6a47279.
Since your change was applied there have been 112 commits pushed to the master branch:

  • 7e378fc: 8335667: Fix simple -Wzero-as-null-pointer-constant warnings in compiler code
  • ced9906: 8334371: [AIX] Beginning with AIX 7.3 TL1 mmap() supports 64K memory pages
  • 916db07: 8335532: [JVMCI] Export VM_Version::L1_line_size in JVMCI
  • c0604fb: 8334890: Missing unconditional cross modifying fence in nmethod entry barriers
  • cf1be87: 8335663: Fix simple -Wzero-as-null-pointer-constant warnings in C2 code
  • 0bb9c76: 8324089: Fix typo in the manual page for "jcmd" (man jcmd)
  • 3e3f83f: 8335385: javac crash on unattributed piece of AST
  • b20e8c8: 8335397: Improve reliability of TestRecursiveMonitorChurn.java
  • 38a578d: 8334738: os::print_hex_dump should optionally print ASCII
  • 7b894bc: 8332786: When dumping static CDS archives, explicitly assert that we don't use a CDS archive
  • ... and 102 more: https://git.openjdk.org/jdk/compare/4ce8822b6c53b8bd72713f1bfaf6673b91aabea4...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jul 4, 2024
@openjdk openjdk bot closed this Jul 4, 2024
@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 Jul 4, 2024
@openjdk
Copy link

openjdk bot commented Jul 4, 2024

@AlekseiEfimov @nizarbenalla Pushed as commit 6a47279.

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

@nizarbenalla nizarbenalla deleted the naming branch September 19, 2024 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants