[weld-dev] Clarification question on CDI specification section 2.2.1

Matej Novotny manovotn at redhat.com
Fri Feb 28 02:58:38 EST 2020



----- Original Message -----
> From: "Laird Nelson" <ljnelson at gmail.com>
> To: "Matej Novotny" <manovotn at redhat.com>
> Sent: Thursday, February 27, 2020 5:35:53 PM
> Subject: Re: [weld-dev] Clarification question on CDI specification section 2.2.1
> 
> On Thu, Feb 27, 2020 at 1:34 AM Matej Novotny <manovotn at redhat.com> wrote:
> 
> > the two bullet points IMO do not have an overlap, e.g. your bean can be an
> > array type but there is no (un)boxing there, or it can be a primitive type
> > in which case there is (un)boxing.
> >
> 
> OK.  Clearly this is the behavior, so it's just the language that is
> imprecise, i.e. "identical" is used in at least two senses, maybe three,
> not just one.
> 
> Also: "Two array types are considered identical only if the element type is
> identical."  Why does this sentence exist?  What is it trying to tell me?

Over the years I have seen little usage of arrays as beans, this might well be underspecified area.
However, due to backward compatibility requirements, we wouldn't be able to make huge changes to existing behavior.
In other words, looking into what Weld does in these cases is probably a good starting point for any spec clarifications.

> 
> And is a GenericArrayType an "array type"?  

That's a good question, frankly I don't know.

> Should ArrayList[] be
> assignable to ArrayList<Integer>[]?

This sounds like something that should not work as the elements of these arrays can wildly differ.
> 
> If you think it's unclear, feel free to propose better wording in CDI.
> > They're using GH issues now - https://github.com/eclipse-ee4j/cdi
> 
> 
> Thanks.
> 
> Laird
> 


More information about the weld-dev mailing list