this

sorted = Arrays.asList((Component[])children);

doesn't look right. I think it should have been (Object[])children
although a type check would be appropriate.

-Matej

On Fri, Nov 28, 2008 at 7:30 PM, jWeekend <[EMAIL PROTECTED]> wrote:
>
> Not quite.
> String[] bO = (String[])(new Object[]{"yes","we","can"});
> compiles but fails at run time.
>
> Regards - Cemal
> http://www.jWeekend.co.uk  http://jWeekend.co.uk
>
>
>
> Valentine2008 wrote:
>>
>> It will bring the compilation error when trying to cast arrays in Java.
>>
>> So you mean it is a bug in Wicket?
>>
>>
>> Timo Rantalaiho wrote:
>>>
>>> On Thu, 27 Nov 2008, Valentine2008 wrote:
>>>> java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to
>>>> [Lorg.apache
>>>> .wicket.Component;
>>>>         at
>>>> org.apache.wicket.MarkupContainer.iterator(MarkupContainer.java:478)
>>>> .........
>>>>
>>>> The code on line 478 of MarkupContainer.java is:
>>>> sorted = Arrays.asList((Component[])children);
>>>>
>>>> Is it a bug of Wicket?
>>>
>>> No, I think it's a limitation of Java. You cannnot cast
>>> arrays.
>>>
>>> Best wishes,
>>> Timo
>>>
>>> --
>>> Timo Rantalaiho
>>> Reaktor Innovations Oy    <URL: http://www.ri.fi/ >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Bug-of-Wicket-1.3.4-when-iterate-the-form-using-iterator%28Comparator%29--tp20723903p20738179.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to