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

GuiceToHk2JITResolver does not resolve #564

Open
Akaame opened this issue Dec 26, 2021 · 0 comments
Open

GuiceToHk2JITResolver does not resolve #564

Akaame opened this issue Dec 26, 2021 · 0 comments

Comments

@Akaame
Copy link

Akaame commented Dec 26, 2021

https://github.com/Akaame/jersey2-guice-example-with-test

I have created the above example repo to test Guice to HK2 bridge in which I can confirm that HK2 ServiceLocator indeed gets the instances from Guice. However I have two problems:

  • Injectee.parent == null therefore resolution immediately fails at this line.
  • I make it pass with assigning a bogus value during debug, however the Lookup Key is ServiceImpl (concrete class) and not Service (interface) therefore only the following succeeds which is not exactly what I want:
// This succeeds
Service service = InjectionManagerProvider.getInjectionManager(context)
                .getInstance(ServiceImpl.class);
// This fails
Service service = InjectionManagerProvider.getInjectionManager(context)
                .getInstance(ServiceImpl.class);

@jwells131313 Sorry for pinging you directly on this, but could you please take a look at this and tell if it is an issue on my side or on the bridge?

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

No branches or pull requests

1 participant