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

Inconsistent use of getInterfaceMethodIfPossible for init method invocation #23323

Closed

Conversation

AlexRenCN
Copy link

@AlexRenCN AlexRenCN commented Jul 20, 2019

No description provided.

@pivotal-issuemaster
Copy link

@AlexRenCN Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-issuemaster
Copy link

@AlexRenCN Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jul 20, 2019
@sbrannen sbrannen added the in: core Issues in core modules (aop, beans, core, context, expression) label Jul 20, 2019
@sbrannen sbrannen changed the title Do not use method 'getInterfaceMethodIfPossible' while does not use s… Only invoke 'getInterfaceMethodIfPossible' when security manager is in use Jul 20, 2019
@sbrannen sbrannen self-assigned this Jul 20, 2019
@sbrannen
Copy link
Member

Related to gh-22939

@sbrannen sbrannen removed the status: waiting-for-triage An issue we've not yet triaged or decided on label Jul 20, 2019
@sbrannen sbrannen added this to the 5.1.9 milestone Jul 20, 2019
@sbrannen sbrannen added the type: enhancement A general enhancement label Jul 20, 2019
@sbrannen sbrannen closed this in f92b60c Jul 20, 2019
@sbrannen sbrannen changed the title Only invoke 'getInterfaceMethodIfPossible' when security manager is in use Only invoke getInterfaceMethodIfPossible() when security manager is in use Jul 20, 2019
@sbrannen
Copy link
Member

This has been merged into 5.1.x in commit f92b60c.

Thanks

@jhoeller
Copy link
Contributor

I'm afraid this change is the wrong way round: getInterfaceMethodIfPossible needs to be consistently applied both with and without a SecurityManager since it is primarily there for visibility limitations in the Java 9 module system, just like the equivalent check in DisposableBeanAdapter. From that perspective, this is a bug that we need to fix, referring to methodToInvoke instead of plain initMethod in the else block as well. I'll change the title of this ticket accordingly.

@jhoeller jhoeller reopened this Jul 20, 2019
@jhoeller jhoeller changed the title Only invoke getInterfaceMethodIfPossible() when security manager is in use Consistent use of getInterfaceMethodIfPossible() with and without SecurityManager Jul 20, 2019
@jhoeller jhoeller added type: bug A general bug and removed type: enhancement A general enhancement labels Jul 20, 2019
@jhoeller jhoeller changed the title Consistent use of getInterfaceMethodIfPossible() with and without SecurityManager Inconsistent use of getInterfaceMethodIfPossible for init method invocation Jul 20, 2019
@jhoeller jhoeller assigned jhoeller and unassigned sbrannen Jul 20, 2019
@jhoeller jhoeller closed this in 4a09b32 Jul 20, 2019
@AlexRenCN AlexRenCN deleted the spring-master-190720 branch July 23, 2019 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants