-
Notifications
You must be signed in to change notification settings - Fork 6.2k
JDK-8305206: Add @spec tags in java.base/java.* (part 1) #13248
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-8305206: Add @spec tags in java.base/java.* (part 1) #13248
Conversation
|
👋 Welcome back jjg! A progress list of the required criteria for merging this PR into |
|
@jonathan-gibbons The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
AlanBateman
left a comment
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.
| * @throws SecurityException if the current thread cannot modify this | ||
| * thread. | ||
| * | ||
| * @spec jni/index.html Java Native Interface Specification |
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.
The link to the JNI spec in this method is from implNote so I'm wondering if the spec link is needed here.
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.
Right now, the tag is added for any declaration whose comment contains a reference to an external spec (i.e. with <a href-....>.
When we enable the "External Specifications" page, it will contain a link back to this page as part of the cross-reference info, which seems useful. That being said, if you feel strongly the tag should not be added here, I can remove it.
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.
Leave it in for now and we can look at it again when the external spec page is in place. My comment is mostly that it will look a bit strange to link to this method because it's text in an implNote rather than spec.
| * permission required by a file type detector implementation. | ||
| * | ||
| * @spec https://www.rfc-editor.org/info/rfc2045 | ||
| * RFC 2045: RFC 2045: Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies |
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.
Maybe this one can be put on two lines to avoid the wrapping when looking at is side-by-side.
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.
Fixed. There was also a stutter-bug with a double "RFC 2045: RFC 2045:" which I have also fixed.
The initial assumption was "after the @param/@return/@throws group". Overall, as I said in the description for this PR, the block tags are not very consistent about ordering. I was thinking we might want to recommend an overall ordering, but I'm worried it would be too intrusive a change to apply generally. In the description, I suggested an ordering based on the |
naotoj
left a comment
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.
Changes in i18n-related classes look good to me.
|
@jonathan-gibbons 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 55 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 |
jddarcy
left a comment
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.
Good to see these changes.
Okay, I think it's just a few of the usages that I sampled had author tags left over from early JDK releases and they end up between the spec and see tags. We can fix these things up at another time. |
LanceAndersen
left a comment
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.
Hi Jon,
This looks fine. I was wondering if we should do the same for java.util.zip and the PKWare Zip Spec or where java.sql references the JDBC Spec?
dfuch
left a comment
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.
I had a look at the java.net part and it looks reasonable.
Well, I must need coffee this morning as obviously JDBC is in the java.sql module, not java.base.... So scratch that comment ;-) |
|
I didn't see any changes to security APIs - are they coming in a follow-on issue? |
| * @see java.io.Externalizable | ||
| * @see <a href="{@docRoot}/../specs/serialization/output.html"> | ||
| * <cite>Java Object Serialization Specification,</cite> Section 2, "Object Output Classes"</a> | ||
| * @since 1.1 |
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.
Just confirming... The changes to the java.io classes for the Serialization Spec now all point to the index rather than particular chapters/sections. I'm assuming that's intentional so that when the top-level Spec page appears, there is a single entry for that specification.
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.
The @spec tag should point to the root, but we should not remove more specific references to within the spec. I will review places where @see has been removed/replaced.
mlchung
left a comment
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.
LGTM
The other modules will be done in due course. |
Yes, this is Add |
|
/integrate |
|
Going to push as commit c6bd489.
Your commit was automatically rebased without conflicts. |
|
@jonathan-gibbons Pushed as commit c6bd489. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Please review a change to add
@spectags (and remove some equivalent@seetags) to the main "core-libs" packages injava.basemodule.This is similar to, and a subset of, PR #11073. That PR was withdrawn, and based on the ensuing discussion and suggestion, is now being handled with a series of PRs for various separate parts of the system. Follow-up PRs will be provided for the rest of
java.base, forjava.desktop, and for XML APIs. The "LangTools" modules have already been updated. The "External Specifications" page has been temporarily disabled until this work is complete.While the primary content of the change was automated, I've manually adjusted the formatting, to break long lines.
It is clear there is significant inconsistency in the ordering of block tags in doc comment. We might want to (separately) consider normalizing the order of the tags, perhaps according to the order defined for the tags in the generated output, as given here
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/13248/head:pull/13248$ git checkout pull/13248Update a local copy of the PR:
$ git checkout pull/13248$ git pull https://git.openjdk.org/jdk.git pull/13248/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 13248View PR using the GUI difftool:
$ git pr show -t 13248Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/13248.diff
Webrev
Link to Webrev Comment