Marko Lukša commented on Bug WELD-1144

Jozef, thanks for the input. I've followed your advice and changed the patch. Please take a look at https://github.com/luksa/weld-core/commit/892e489ff8fa8e68b7f4415c701df1f8e3f18361

I moved the partitioning out of injectFieldsAndInitializers(), but it wasn't as simple as just moving it to Beans.getFieldInjectionPoints(). The reason is that List<Set<FieldInjectionPoint>> and List<Set<MethodInjectionPoint>> need not only to be of the same length, but the n-th element of both lists should contain declared members of the same class in the class hierarchy, otherwise the order of injection would be wrong.

Because of this, I had to introduce Beans.getFieldInjectionPointsAndInitializerMethods() instead of two separate methods that existed until now (getFieldInjectionPoints() and getInitializerMethods()).

As you suggested, I now treat differently the annotated types provided by the extension vs. those provided by Weld. Although I usually don't like keeping two completely different ways of doing pretty much the same thing in the code, in this case this actually makes it less probable that my changes will break something, since the new code only affects injection into annotatedTypes returned by extensions. And up to now, this was broken, anyway.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira