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

8308152: PropertyDescriptor should work with overridden generic getter method #14228

Closed
wants to merge 1 commit into from

Conversation

mrserb
Copy link
Member

@mrserb mrserb commented May 30, 2023

Description of the bug, copied from #7190

In jdk 9 we started to sort the list of methods for each class for two reasons:

  1. We had a number of bugs which state that our JavaBeans randomly does not work, examples: JDK-6807471[1] , JDK-6788525[2], the reason was that the order of methods from Class.getMethods() is not specified.
  2. We tried to sort methods so the more specific returns types come first, this was done because our logic for selecting the correct method did not work properly.

The second issue above was fixed by the separate change JDK-8196373 so now we only need to sort the list of methods in any order and do not care about return types.

Unfortunatly it was found that we have two code paths to create a PropertyDescriptor, one of them is used by the Introspector.getBeanInfo and was patched by the JDK-8196373 and another when the PropertyDescriptor is created directly and it still affected by that bug.

The code added by this patch is the same we already use in PropertyInfo.java, see
https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/com/sun/beans/introspect/PropertyInfo.java#L81


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-8308152: PropertyDescriptor should work with overridden generic getter method (Bug - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 14228

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 30, 2023

👋 Welcome back serb! 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
Copy link

openjdk bot commented May 30, 2023

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

  • client

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 client client-libs-dev@openjdk.org label May 30, 2023
@mrserb mrserb marked this pull request as ready for review May 31, 2023 22:22
@openjdk openjdk bot added the rfr Pull request is ready for review label May 31, 2023
@mlbridge
Copy link

mlbridge bot commented May 31, 2023

Webrevs

@openjdk
Copy link

openjdk bot commented Jun 8, 2023

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

8308152: PropertyDescriptor should work with overridden generic getter method

Reviewed-by: azvegint

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

  • 90027ff: 8309515: Stale cached data from Matcher.namedGroups() after Matcher.usePattern()
  • ea41907: 8297923: java.awt.ScrollPane broken after multiple scroll up/down
  • 99749c5: 8309562: [JVMCI] Export symbols used by VirtualThread notifyJvmti intrinsics to JVMCI compilers.
  • 92beb85: 8309474: [IR Framework] Wrong @ForceCompile link in README
  • 6402004: 8256302: releasing oopStorage when deflating allows for faster deleting
  • 02bce0b: 8309532: java/lang/Class/getDeclaredField/FieldSetAccessibleTest should filter modules that depend on JVMCI
  • 4ffc8cc: 8309574: Improve core reflection tests for JEP 445
  • e3f3ac0: 8309420: com/sun/jdi/StepTest.java fails with virtual thread wrapper
  • c38abbf: 8309510: com/sun/jdi/RedefineNestmateAttr/TestNestmateAttr.java no longer needs to override startUp() method
  • c24b0ba: 8309503: Improve javax.lang.model tests for JEP 445
  • ... and 141 more: https://git.openjdk.org/jdk/compare/7891de331a42719234652e0fb3da6827c083707c...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 Jun 8, 2023
@mrserb
Copy link
Member Author

mrserb commented Jun 8, 2023

/integrate

@openjdk
Copy link

openjdk bot commented Jun 8, 2023

Going to push as commit 73dd03c.
Since your change was applied there have been 153 commits pushed to the master branch:

  • 760cb04: 8309569: sun/security/pkcs11/Signature/TestRSAKeyLength.java fails after JDK-8301553
  • e8a5984: 8309630: Clean up tests that reference deploy modules
  • 90027ff: 8309515: Stale cached data from Matcher.namedGroups() after Matcher.usePattern()
  • ea41907: 8297923: java.awt.ScrollPane broken after multiple scroll up/down
  • 99749c5: 8309562: [JVMCI] Export symbols used by VirtualThread notifyJvmti intrinsics to JVMCI compilers.
  • 92beb85: 8309474: [IR Framework] Wrong @ForceCompile link in README
  • 6402004: 8256302: releasing oopStorage when deflating allows for faster deleting
  • 02bce0b: 8309532: java/lang/Class/getDeclaredField/FieldSetAccessibleTest should filter modules that depend on JVMCI
  • 4ffc8cc: 8309574: Improve core reflection tests for JEP 445
  • e3f3ac0: 8309420: com/sun/jdi/StepTest.java fails with virtual thread wrapper
  • ... and 143 more: https://git.openjdk.org/jdk/compare/7891de331a42719234652e0fb3da6827c083707c...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jun 8, 2023

@mrserb Pushed as commit 73dd03c.

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

@mrserb mrserb deleted the JDK-8308152 branch June 8, 2023 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client client-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants