Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdi-dev] History of/rationale for type closure rules for producer method return types?

If you have:

@Produces Integer[] makeIntegerArray() { return new Integer[] { 42 }; }

…the bean types of this bean will be, exactly, {Integer[], Object} (see https://jakarta.ee/specifications/cdi/4.0/jakarta-cdi-spec-4.0#producer_method_types).

Does anyone know or remember what the rationale is or was for not permitting {Number[], Cloneable, Serializable} to also be automatically part of the bean types set? I'm sure there must have been a good reason.

Best,
Laird


Back to the top