Skip to content

Conversation

artembilan
Copy link
Member

Fixes #3765

The DefaultMethodInvokingMethodInterceptor has several strategies
for default method invocations in the messaging gateway.
One of them is based on the Lookup constructor which causes
a WARNING: An illegal reflective access operation has occurred.
This can be done lazily when there is no MethodHandles.privateLookupIn
in Java version used for the project.

  • Fix OPEN enum value for the Constructor<Lookup> to be resolved in
    a lazy manner via Supplier and boolean flag

Cherry-pick to 5.5.x

Fixes spring-projects#3765

The `DefaultMethodInvokingMethodInterceptor` has several strategies
for `default` method invocations in the messaging gateway.
One of them is based on the `Lookup` constructor which causes
a `WARNING: An illegal reflective access operation has occurred`.
This can be done lazily when there is no `MethodHandles.privateLookupIn`
in Java version used for the project.

* Fix `OPEN` enum value for the `Constructor<Lookup>` to be resolved in
a lazy manner via `Supplier` and `boolean` flag

**Cherry-pick to `5.5.x`**
@garyrussell garyrussell merged commit cd84f16 into spring-projects:main Apr 11, 2022
@garyrussell
Copy link
Contributor

...and cherry-picked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WARNING: An illegal reflective access operation has occurred

2 participants