Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdi-dev] CDI history question: non-void observer methods

Hi,

me and Matěj and Martin were discussing observer methods earlier today and found, to my surprise, that the CDI specification in fact doesn't require them to declare a return type of `void` (even though all the examples in the spec, as well as all observers I've seen in practice, _are_ `void`).

Does anyone remember why that is? Is it an omission, or was that a conscious decision to allow people to call observer methods manually?

You can also vote for (or against) https://github.com/jakartaee/cdi/issues/636 if you think this is something we should (or shouldn't) rectify.

Thanks,

LT

Back to the top