Skip to content

Commit

Permalink
Don't create JNINativeCallWrapperMethods for JNICallTrampolineMethods
Browse files Browse the repository at this point in the history
`JNICallTrampolineMethod`s can not be invoked from Java, so creating
`JNINativeCallWrapperMethod`s for them is not needed.

Closes: oracle#4018
  • Loading branch information
zakkak committed Dec 10, 2021
1 parent 851e2a4 commit 5b8a371
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ class JNINativeCallWrapperSubstitutionProcessor extends SubstitutionProcessor {
@Override
public ResolvedJavaMethod lookup(ResolvedJavaMethod method) {
assert method.isNative() : "Must have been registered as a native substitution processor";
if (method instanceof JNICallTrampolineMethod) {
return method;
}
return callWrappers.computeIfAbsent(method, JNINativeCallWrapperMethod::new);
}

Expand Down

0 comments on commit 5b8a371

Please sign in to comment.