[weld-dev] AnnotationLiteral
Gavin King
gavin.king at gmail.com
Sun Nov 8 13:18:36 EST 2009
You have rolled back what change?
The little exception I added?
On Sun, Nov 8, 2009 at 8:25 AM, Pete Muir <pmuir at redhat.com> wrote:
> Also, note that this change has broken the ability to do:
>
> instance.select(new AnnotationLiteral<Foo>() {});
>
> Which I believe is desirable. Regardless of this, we have a lot of test code
> which uses this form, so I have rolled back this change, we can revisit
> after 1.0.0
>
> Pete
>
> On 8 Nov 2009, at 13:23, Pete Muir wrote:
>
>>
>> On 8 Nov 2009, at 13:21, Pete Muir wrote:
>>
>>> Gavin, I wonder if we should actually have AnnotationLiteral and
>>> TypeLiteral actually implement Serializable as this places a burden on
>>> all subclasses, that they *must* be serializable (clearly this is not
>>> enforced, but it is correct, and the error messages users get will be
>>> a lot worse).
>>>
>>> Rather I wonder if *Literal should support subclasses which wish to
>>> implement Serializable. To do this we would just indicate this is the
>>> case in the javadoc and remove Serializable.
>>
>> BTW this is the generally recommended approach for APIs.
>>
>>>
>>> WDYT?
>>>
>>> On 8 Nov 2009, at 09:31, Gavin King wrote:
>>>
>>>> Well, I couldn't sleep, so I fixed it.
>>>>
>>>> On Sun, Nov 8, 2009 at 3:33 AM, Gavin King <gavin.king at gmail.com>
>>>> wrote:
>>>>>
>>>>> So I've made some improvements to TypeLiteral and AnnotationLiteral,
>>>>> including making them serializable.
>>>>>
>>>>> I need to get some sleep now, but at the last minute I noticed that
>>>>> AnnotationLiteral is pretty broken for primitive array valued
>>>>> members.
>>>>> You can't do Object[].class.cast() on primitive arrays.
>>>>>
>>>>> We need to fix that before release.
>>>>>
>>>>> --
>>>>> Gavin King
>>>>> gavin.king at gmail.com
>>>>> http://in.relation.to/Bloggers/Gavin
>>>>> http://hibernate.org
>>>>> http://seamframework.org
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Gavin King
>>>> gavin.king at gmail.com
>>>> http://in.relation.to/Bloggers/Gavin
>>>> http://hibernate.org
>>>> http://seamframework.org
>>>> _______________________________________________
>>>> weld-dev mailing list
>>>> weld-dev at lists.jboss.org
>>>> https://lists.jboss.org/mailman/listinfo/weld-dev
>>>
>>> _______________________________________________
>>> weld-dev mailing list
>>> weld-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/weld-dev
>>
>
>
--
Gavin King
gavin.king at gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org
More information about the weld-dev
mailing list