]
Mark Struberg commented on CDI-721:
-----------------------------------
At first I also thought that we would need such a terminal() method.
But after further thinking about it my conclusion is that we do *not*!
Or better we already have it: getAnnotatedType().
What if some extension calls setAnnotatedType multiple times?
The last one wins!
But if the Extension is well built (and not just random nonsense) then it will first get
the previous AT via getAnnotatedType(). Then modify this information and use it for
setAnnotatedType.
Please chedk how we did it in OWB:
configureAnnotatedType vs setAnnotatedType restrition is unecessarily
strict
----------------------------------------------------------------------------
Key: CDI-721
URL:
https://issues.jboss.org/browse/CDI-721
Project: CDI Specification Issues
Issue Type: Bug
Components: Portable Extensions
Affects Versions: 2.0 .Final
Reporter: Mark Struberg
{noformat}
Any observer of this event is permitted to wrap and/or replace the AnnotatedType by
calling either setAnnotatedType() or configureAnnotatedType(). If both methods are called
within an observer notification an IllegalStateException is thrown.
{noformat}
This rule is way too strict without any real reason.
Any CDI container must support that both methods are being called on the same event
payload anyway. Because we did not forbid that observerMethod1 invokes setAnnotatedType
and observerMethod2 uses configureAnnoatedType. And that's good that way, otherwise
the pluggability would be lost.
We should delete this sentence without any substitution.
The same applies to similar configurator methods like configureBeanAttributes, etc.