Add ObserverMethod#getDeclaringBean method.#578
Conversation
|
The Build Compatible Extension API demands that for synthetic observers, |
@Ladicek that sounds like a mistake we made. I think the declaring class and the declaring bean are both (in case of Portable Extensions) derived from https://github.com/eclipse-ee4j/cdi/blob/master/api/src/main/java/jakarta/enterprise/inject/spi/configurator/ObserverMethodConfigurator.java#L76-L82 So the way I see it, we have two options:
|
|
Actually I'm looking at it again and it seems even my |
|
At the same time, one can distinguish synthetic observers from non-synthetic by the event type, and so it is not necessary to invoke any of these non-portable methods. So it's all good. |
|
With this change weld/core#2605, all should be fine and this can be merged. |
Thanks a lot for that! |
Fixes #563
I am deliberately keeping the return value for synth observers undefined because I understand some implementations can choose to return
nullbut in Weld this is apparently never the case and instead synth. OMs belong to the extension declaring them.