[Yanel-dev] ViewDescriptor ClassCastException

Josias Thöny josias.thoeny at wyona.com
Thu Nov 29 09:10:40 CET 2007


Josias Thöny wrote:
> Michael Wechner wrote:
>> Hi
>>
>> Is it possible that All classes implementing the BasicXMLResource need 
>> to return a ConfigurableViewDescriptor with the method 
>> getViewDescriptors()?
> 
> Yes, that's true.
> In fact resources which extend the BasicXMLResource better should not 
> override the getViewDescriptors() method at all.

After a second thought, maybe we could change the BasicXMLResource s.t. 
it also works if the viewDescriptors are not 
ConfigurableViewDescriptors. The resource could do some kind of fallback 
with a default serializer etc.

Would this make more sense?

josias

> 
>>
>> And otherwise one will receive a ClassCastException?
>>
>> java.lang.ClassCastException
>>        at 
>> org.wyona.yanel.impl.resources.BasicXMLResource.getXMLView(BasicXMLResource.java:173) 
>>
>>
>> If so, then I think we need to declare this somewhere or make the log 
>> statement better, because I think it's not obvious and quite confusing 
>> in the first place.
> 
> I will add a warning.
> 
> josias
> 
>>
>> WDYT?
>>
>> Cheers
>>
>> Michi
>>
> 
> _______________________________________________
> Yanel-development mailing list
> Yanel-development at wyona.com
> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development



More information about the Yanel-development mailing list