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

8223607: --override-methods=summary ignores some signature changes #1734

Closed
wants to merge 1 commit into from

Conversation

hns
Copy link
Member

@hns hns commented Dec 10, 2020

This change causes overriding methods to be documented in the details section under some conditions even when javadoc is run with --override-methods=summary and the method does not have a doc comment. Previously this already happened when the overriding method had a covariant return type (JDK-8219147). The following conditions will now trigger the same behaviour:

  • method visibility changes from protected to public
  • any change in thrown exceptions
  • change in documented annotations anywhere in the method signature

The conditions are simple by intention as we don't want to do checks that add to much complexity (such as distinguishing between checked and unchecked exceptions) and instead want to set the bar for inclusion in the details section relatively low.


Progress

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

Issue

  • JDK-8223607: --override-methods=summary ignores some signature changes

Download

$ git fetch https://git.openjdk.java.net/jdk pull/1734/head:pull/1734
$ git checkout pull/1734

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 10, 2020

👋 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 Dec 10, 2020
@openjdk
Copy link

openjdk bot commented Dec 10, 2020

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

@openjdk openjdk bot added the javadoc javadoc-dev@openjdk.org label Dec 10, 2020
@hns hns changed the title 8223607: --overridden-methods=summary ignores some signature changes 8223607: --override-methods=summary ignores some signature changes Dec 10, 2020
@mlbridge
Copy link

mlbridge bot commented Dec 10, 2020

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.

This looks good, but given the noteworthy and significant changes in VisibleMemberTable,
I'd like to suggest you address JDK-8258429 at this time, which has significant overlap.

@@ -598,6 +602,87 @@ boolean allowInheritedMethods(ExecutableElement inheritedMethod,
return true;
}

// Check whether the signature of an overriding method has any changes worth
// being documented compared to the overridden method.
private boolean overridingSignatureChanged(ExecutableElement method, ExecutableElement overriddenMethod) {
Copy link
Contributor

Choose a reason for hiding this comment

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

In the body of this method, can you add in:

change in abstract/non-abstract (both ways)
change in final/non-final

@hns
Copy link
Member Author

hns commented Dec 18, 2020

New PR created for jdk16 repository, closing this one.

openjdk/jdk16#52

@hns hns closed this Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javadoc javadoc-dev@openjdk.org rfr Pull request is ready for review
2 participants