Skip to content

JDK-8232644: bugs in serialized-form.html #3817

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 2 commits into from
Closed

Conversation

hns
Copy link
Member

@hns hns commented Apr 30, 2021

This implements most suggestions implemented in the JBS issue. The heading for class entries in the page is shortened to " ", followed by a simplified signature line like "class X extends Y implements Serializable".

Furthermore, package names in package headings now link to the package page, @param info is added to the methods, Externalizable is used for classes that implement it. I also added a check for content in @serial tags to avoid spurious empty   lines in the output.

I increased the font size for headings h4 to h6 in the stylesheets because their size was smaller than the default text size, which looked strange. Although the change in font size from h3 to h4 and beyond is now smaller I think it's still recognizable. Headings h4 to h5 are used very little in Javadoc (mostly static doc files and the serialized-form page). I looked at some of the static files and they looked good to me with the new larger heading fonts.

Although I didn't end up using the Signatures class to generate the class signatures (they're just too simple and too specific in what they list), I left in some cleanup of Signatures.TypeSignature, most significantly moving the processing of modifiers from ClassWriterImpl to Signatures.TypeSignature.

I only removed the obsolete resources from the English resource file out of habit of not touching the Chinese and Japanese ones. I guess I could remove it there too.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3817/head:pull/3817
$ git checkout pull/3817

Update a local copy of the PR:
$ git checkout pull/3817
$ git pull https://git.openjdk.java.net/jdk pull/3817/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3817

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3817.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 30, 2021

👋 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 Apr 30, 2021
@openjdk
Copy link

openjdk bot commented Apr 30, 2021

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

  • javadoc

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.

@hns
Copy link
Member Author

hns commented Apr 30, 2021

The new serialized-form.html page including the stylesheet changes can be viewed here:

http://cr.openjdk.java.net/~hannesw/8232644/api.00/serialized-form.html

@mlbridge
Copy link

mlbridge bot commented Apr 30, 2021

Webrevs

Copy link
Contributor

@jonathan-gibbons jonathan-gibbons left a comment

Choose a reason for hiding this comment

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

Generally: wow, very nice cleanup!

That being said, there is a potential conflict/race with a separate review to make sealed cases permanent (not preview.) So, this is approved, with a warning to coordinate with @vicente-romero-oracle about the sealed classes review #3613

this.configuration = classWriter.configuration;
}
private static final Set<String> previewModifiers
= Set.of("sealed", "non-sealed");
Copy link
Contributor

Choose a reason for hiding this comment

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

This needs to be coordinated with the work to make sealed final.
In the changes for that, this set is now empty but the code to process the set (lines 110-126) remains, ready for any future preview modifiers.

Also, given this code exists elsewhere, we should probably try and pull it in to a shared method. That being said, Signatures is probably conceptually the right place for the shared method (not Utils.)

Also, whether or not we make a shared method, we should probably add an explanatory comment explaining why we keep an empty set around, just in case.

Copy link
Member Author

Choose a reason for hiding this comment

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

Generally: wow, very nice cleanup!

That being said, there is a potential conflict/race with a separate review to make sealed cases permanent (not preview.) So, this is approved, with a warning to coordinate with @vicente-romero-oracle about the sealed classes review #3613

Thanks for the review, Jon. @vicente-romero-oracle please go ahead with your PR, I'll update mine afterwards. (I should have been aware you were removing these sealed preview bits.)

@@ -493,7 +493,7 @@ public boolean definesSerializableFields(TypeElement aclass) {
}

@SuppressWarnings("preview")
public String modifiersToString(Element e, boolean trailingSpace) {
public String modifiersToString(Element e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Thinking aloud, would this method be better in Signatures? Maybe later...

@openjdk
Copy link

openjdk bot commented May 6, 2021

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

8232644: bugs in serialized-form.html

Reviewed-by: jjg

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

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 May 6, 2021
@hns
Copy link
Member Author

hns commented May 7, 2021

I decided to back out of the signature/preview related cleanup changes in this PR, which are unrelated to the actual issue. I'll file a separate issue for the signature cleanup. The remaining changes are identical to the reviewed changes and should not conflict with any other pending PRs.

@hns
Copy link
Member Author

hns commented May 7, 2021

/integrate

@openjdk openjdk bot closed this May 7, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels May 7, 2021
@openjdk
Copy link

openjdk bot commented May 7, 2021

@hns Since your change was applied there have been 107 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

Pushed as commit c6aa8f1.

💡 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
integrated Pull request has been integrated javadoc [email protected]
Development

Successfully merging this pull request may close these issues.

2 participants