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

BytecodeRecorderImpl should check registered substitutions for both param and expectedType #668

Closed
starksm64 opened this issue Jan 30, 2019 · 0 comments
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@starksm64
Copy link
Contributor

Currently the loadObjectInstance(MethodCreator, Object param, Map<Object, ResultHandle>, Class<?> expectedType) method looks for a substitution based on the param.getClass() type. It should also check for a substitution based on the expectedType since that is often what is known. For example, in the jwt fraction, RSAPublicKey interface instances are used for signing, and the underlying implementation can change based on the installed security providers. I have registered a substition for RSAPublicKey since there is no public constructor, but this is not seen as the param type in my jdk is sun.security.rsa.RSAPublicKeyImpl.

@starksm64 starksm64 added the kind/bug Something isn't working label Jan 30, 2019
@starksm64 starksm64 self-assigned this Jan 30, 2019
stuartwdouglas added a commit that referenced this issue Jan 30, 2019
Issue #668, look for substitution by expected type if param type fails
@stuartwdouglas stuartwdouglas added this to the 0.8.0 milestone Jan 30, 2019
maxandersen pushed a commit to maxandersen/quarkus that referenced this issue Nov 5, 2022
Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants