isMany() == true should be sufficient checking before calling getList(). 
This problem will be fixed by TUSCANY-521.

Frank.

"Brian Murray" <[EMAIL PROTECTED]> wrote on 09/28/2006 02:18:45 
PM:

> If a DataObject has mixed content, DataObject.getInstanceProperties() 
will
> include a Property for the Sequence that accounts for that mixed 
content.  I
> have verified (on page 87 of the spec) that this is the expected 
behavior.
> 
> Should the Property representing that particular Sequence return 
isMany() ==
> true?
> 
> The problem I have is that I had wanted to perform the following check:
> 
>         currentProperty = (Property) properties.get(i);
>         if (currentProperty.isMany())
>         {
>             List values =  dataObject.getList(i);
> 
> However, in the case where currentProperty is the "mixed" this will 
result
> in a ClassCastException because 
org.apache.tuscany.sdo.util.BasicSequence is
> incompatible with java.util.List.  The exception is thrown in
> DataObjectUtil.getList when the cast to List is attempted.
> 
> Is it true then that isMany() == true is insufficient to assume that you
> will be able to call getList()?


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

Reply via email to