We can't provide a default implementation as javax.enterprise.inject.spi.CDI does not allow to unset the CDIProvider. The hack used in the TCK test is using a subclass to set the field directly. The other option would be to use reflection but this might not work if a SecurityManager is used. So the only option is to introduce a new interface and this it not backwards compatible.
|