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

DATACMNS-1376 - Fix illegal access warning in DefaultMethodInvokingMethodInterceptor on Java 9 and higher #307

Closed
wants to merge 3 commits into from

Conversation

mp911de
Copy link
Member

@mp911de mp911de commented Aug 17, 2018

We now attempt to use private MethodHandles lookup as the first mechanism to resolve a MethodHandle for default interface methods and fall back to reflection-based Lookup construction if private lookup is not available. Reflective availability is checked lazily to prevent illegal access on enum constant construction. This approach prevents an illegal access which was logged by attempting a reflection-based lookup first.

We also introduced a FALLBACK mechanism to split encapsulated access from a fallback mechanism.


Related ticket: DATACMNS-1376.

odrotbohm and others added 3 commits August 17, 2018 09:06
…AuditingHandler.

Internal refactorings to expose the auditor types to use for creator and modifier. Tweaked implementation to be generally able to deal with multiple AuditorAware beans. AuditingHandler now dynamically looks up AuditorAware implementations from a BeanFactory in case no unique AuditorAware instance has been configured.
…thodInterceptor on Java 9 and higher.

We now attempt to use private MethodHandles lookup as the first mechanism to resolve a MethodHandle for default interface methods and fall back to reflection-based Lookup construction if private lookup is not available. Reflective availability is checked lazily to prevent illegal access on enum constant construction. This approach prevents an illegal access which was logged by attempting a reflection-based lookup first.

We also introduced a FALLBACK mechanism to split encapsulated access from a fallback mechanism.
odrotbohm pushed a commit that referenced this pull request Aug 17, 2018
…thodInterceptor on Java 9 and higher.

We now attempt to use private MethodHandles lookup as the first mechanism to resolve a MethodHandle for default interface methods and fall back to reflection-based Lookup construction if private lookup is not available. Reflective availability is checked lazily to prevent illegal access on enum constant construction. This approach prevents an illegal access which was logged by attempting a reflection-based lookup first.

We also introduced a FALLBACK mechanism to split encapsulated access from a fallback mechanism.

Original pull request: #307.
odrotbohm added a commit that referenced this pull request Aug 17, 2018
Moved JVM version lookup into Version.

Original pull request: #307.
odrotbohm pushed a commit that referenced this pull request Aug 17, 2018
…thodInterceptor on Java 9 and higher.

We now attempt to use private MethodHandles lookup as the first mechanism to resolve a MethodHandle for default interface methods and fall back to reflection-based Lookup construction if private lookup is not available. Reflective availability is checked lazily to prevent illegal access on enum constant construction. This approach prevents an illegal access which was logged by attempting a reflection-based lookup first.

We also introduced a FALLBACK mechanism to split encapsulated access from a fallback mechanism.

Original pull request: #307.
odrotbohm added a commit that referenced this pull request Aug 17, 2018
Moved JVM version lookup into Version.

Original pull request: #307.
@odrotbohm odrotbohm closed this Aug 17, 2018
@odrotbohm odrotbohm deleted the issue/DATACMNS-1376 branch August 17, 2018 11:10
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.

None yet

2 participants