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

JDK-8315921: Invalid CSS declarations in java.lang class documentation #15762

Closed
wants to merge 2 commits into from

Conversation

hns
Copy link
Member

@hns hns commented Sep 15, 2023

This change fixes two errors in inline HTML styles in the java.lang package:

  • wrong CSS property name in java.lang.String
  • CSS declaration terminated by colon instead of semicolon in java.lang.Thread

Both errors caused the style declarations to be ignored and an error message to be shown in the browser console.

The bug is noreg-doc, I tested the docs in the browser to make sure the error message is gone and the HTML displays as intended.


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-8315921: Invalid CSS declarations in java.lang class documentation (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 15762

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 15, 2023

👋 Welcome back hannesw! 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 added the rfr Pull request is ready for review label Sep 15, 2023
@openjdk
Copy link

openjdk bot commented Sep 15, 2023

@hns 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 Sep 15, 2023
@mlbridge
Copy link

mlbridge bot commented Sep 15, 2023

Webrevs

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 13, 2023

@hns This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

Copy link
Member

@jaikiran jaikiran left a comment

Choose a reason for hiding this comment

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

Hello Hannes, the changes look fine to me. I wasn't aware we had custom CSS usage within javadoc tags in the JDK.

@@ -189,7 +189,7 @@
* In the JDK Reference Implementation, the virtual thread scheduler may be configured
* with the following system properties:
* <table class="striped">
* <caption style="display:none:">System properties</caption>
* <caption style="display:none;">System properties</caption>
Copy link
Member

Choose a reason for hiding this comment

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

Just out of curiosity, is that semi-colon even needed, or would display:none be enough?

Copy link
Member

Choose a reason for hiding this comment

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

Now that I think about it, do you know why the display:none is being set here? I have very limited knowledge of CSS, wouldn't the use of display:none make the System Properties caption text invisible?

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed, the semi-colon is optional at the end of an inline CSS attribute. I removed it in my follow-up commit.

Regarding the presence of invisible <caption> elements in HTML tables: this is indeed questionable. I assume it was based on the notion that a <caption> element is required in HTML tables, which is not the case (neither for HTML4 nor HTML5). However, it is quite pervasive (there are around 170 occurrences of <caption style="display:none"> in OpenJDK source), and one could argue that it serves as an informational comment both in Java and HTML.

@openjdk
Copy link

openjdk bot commented Oct 25, 2023

@hns 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:

8315921: Invalid CSS declarations in java.lang class documentation

Reviewed-by: jpai, alanb

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

  • 792d829: 8319205: Parallel: Reenable work stealing after JDK-8310031
  • 23a96bf: 8318894: G1: Use uint for age in G1SurvRateGroup
  • 64f8253: 8317332: Prepare security for permissive-
  • 53bb7cd: 8318957: enhance agentlib:jdwp help output by info about allow option
  • d6ce62e: 8306561: Possible out of bounds access in print_pointer_information
  • 7f31a05: 8319203: Parallel: Rename addr_is_marked_imprecise
  • 4a85f6a: 8317132: Prepare HotSpot for permissive-
  • 5207443: 8317965: TestLoadLibraryDeadlock.java fails with "Unable to load native library.: expected true, was false"
  • ee57e73: 8317612: ChoiceFormat and MessageFormat constructors call non-final public method
  • f262f06: 8319211: Regression in LoopOverNonConstantFP
  • ... and 651 more: https://git.openjdk.org/jdk/compare/5cea53d372744ddf1bedaae4667415e6525ef82f...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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 25, 2023
@hns
Copy link
Member Author

hns commented Nov 2, 2023

Thanks for the review, @jaikiran.

I had found the issues in the original commit just by accidental browsing of the API docs and had assumed they were one-off errors. Now searching over OpenJDK sources again for these errors I found a lot more, most of them in java.text.MessageFormat. I fixed these in a second commit.

Copy link
Contributor

@AlanBateman AlanBateman left a comment

Choose a reason for hiding this comment

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

I think two of the cases where the CSS was terminated with a colon may have been my fault.

@hns
Copy link
Member Author

hns commented Nov 2, 2023

Thanks, I won't blame you, CSS within HTML within JavaDoc comments is weird. :)

@hns
Copy link
Member Author

hns commented Nov 2, 2023

/integrate

@openjdk
Copy link

openjdk bot commented Nov 2, 2023

Going to push as commit 2d4a4d0.
Since your change was applied there have been 661 commits pushed to the master branch:

  • 792d829: 8319205: Parallel: Reenable work stealing after JDK-8310031
  • 23a96bf: 8318894: G1: Use uint for age in G1SurvRateGroup
  • 64f8253: 8317332: Prepare security for permissive-
  • 53bb7cd: 8318957: enhance agentlib:jdwp help output by info about allow option
  • d6ce62e: 8306561: Possible out of bounds access in print_pointer_information
  • 7f31a05: 8319203: Parallel: Rename addr_is_marked_imprecise
  • 4a85f6a: 8317132: Prepare HotSpot for permissive-
  • 5207443: 8317965: TestLoadLibraryDeadlock.java fails with "Unable to load native library.: expected true, was false"
  • ee57e73: 8317612: ChoiceFormat and MessageFormat constructors call non-final public method
  • f262f06: 8319211: Regression in LoopOverNonConstantFP
  • ... and 651 more: https://git.openjdk.org/jdk/compare/5cea53d372744ddf1bedaae4667415e6525ef82f...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Nov 2, 2023

@hns Pushed as commit 2d4a4d0.

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

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
3 participants