-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Conversation
👋 Welcome back hannesw! A progress list of the required criteria for merging this PR into |
The new http://cr.openjdk.java.net/~hannesw/8232644/api.00/serialized-form.html |
Webrevs
|
There was a problem hiding this 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"); |
There was a problem hiding this comment.
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.
There was a problem hiding this 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
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) { |
There was a problem hiding this comment.
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...
@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:
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
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 |
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. |
/integrate |
@hns Since your change was applied there have been 107 commits pushed to the
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. |
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
toh6
in the stylesheets because their size was smaller than the default text size, which looked strange. Although the change in font size fromh3
toh4
and beyond is now smaller I think it's still recognizable. Headingsh4
toh5
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 ofSignatures.TypeSignature
, most significantly moving the processing of modifiers fromClassWriterImpl
toSignatures.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
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