-
Notifications
You must be signed in to change notification settings - Fork 38.4k
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
Generic constructor argument (e.g. ObjectProvider) fails to resolve for inner class [SPR-16734] #21275
Comments
Juergen Hoeller commented I suppose this only happens when you forget to declare the nested class as Even there we need to fix it, of course, but we highly recommend to declare nested classes as |
Juergen Hoeller commented It turns out that this is a variant of the |
Juergen Hoeller commented Sam Brannen, you'll love this: |
Juergen Hoeller commented The corresponding test unexpectedly fails on the CI server (on Linux? on a different JDK 8 patch level?), still mismatching the parameter between |
Juergen Hoeller commented Turns out I only committed the test, not the actual fix... Pushing to the CI server once again :-) |
Andrei Ivanov commented Btw, I've noticed on the jdk8u-dev mailing lists that fixed bugs get back ported from newer versions, so maybe someone can ask for the related ones too? |
Juergen Hoeller commented This one hasn't even been addressed in JDK 11 yet, so we'll rather have to push for an actual fix first... At least the workaround seems as safe as the one we introduced for #21193. No information lost, just having to adapt the index assumptions in the returned array. |
Sam Brannen commented
That is indeed quite amusing! :-o
Nice!
Hmmm.... that's a pity.
|
David Kensche opened SPR-16734 and commented
I have a class containing an inner class configuration that inherits from JpaBaseConfiguration. It therefore overrides the protected super constructor. Upon application startup I get a misleading error message stating that there is no
ObjectProvider<JtaTransactionManager>
. However, the root cause for this is that the inner class itself is listed as first argument in the list of constructor arguments, leading to an off-by-1 error, therefore not satisfying the condition to create the ObjectProvider automatically.This again resulted for me in hours of searching for dependency conflicts as the internet suggests this is a dependency conflict.
Here is the code example:
Affects: 4.3.16, 5.0.5
Reference URL: https://bugs.java.com/view_bug.do?bug_id=5087240
Issue Links:
Backported to: 4.3.17
The text was updated successfully, but these errors were encountered: