You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Yang ZHONG (JIRA)" <tu...@ws.apache.org> on 2006/12/02 23:50:22 UTC

[jira] Commented: (TUSCANY-931) Sequence.add(int index, String propertyName, Object value) is not functioning correctly

    [ http://issues.apache.org/jira/browse/TUSCANY-931?page=comments#action_12455138 ] 
            
Yang ZHONG commented on TUSCANY-931:
------------------------------------

'Customer.multi' is an EMF notation for 'Type.Property'. David's Test Case has a Type 'Customer' which has a Property 'multi'

Not sure the Test Case is a supported one since Property 'multi' is neither a XML element nor a mixed text.
Adding the following may make the Test Case a valid one:
    multiProperty.setBoolean("xmlElement", true);

However, current Tuscany implementation hasn't supported "xmlElement" yet.
Do we want to do that?

I've tried hacking SDOUtil.createProperty to always create XML element, thus the Test Case passed.

On the other hand, Sequence/BasicFeatureMap validate(int,Object) may have a defect which doesn't validate value to append to empty list.
That's why 1st
    seq.add("multi", "line 5");
succeeded.

> Sequence.add(int index, String propertyName, Object value) is not functioning correctly
> ---------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-931
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-931
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-Mx, Java-M2
>         Environment: No specific environment
>            Reporter: David T. Adcox
>         Attachments: DefectTestApp.java
>
>
> The Sequence.add(int index, String propertyName, Object value) throws a java.lang.RuntimeException.  Here is a stack trace from this issue:
> Exception in thread "main" java.lang.RuntimeException: Invalid entry feature 'Customer.multi'
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.validate(BasicFeatureMap.java:87)
> 	at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList.java:661)
> 	at org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUnique(NotifyingListImpl.java:384)
> 	at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUnique(NotifyingListImpl.java:368)
> 	at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:645)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.doAdd(BasicFeatureMap.java:547)
> 	at org.eclipse.emf.ecore.util.BasicFeatureMap.add(BasicFeatureMap.java:1097)
> 	at org.apache.tuscany.sdo.util.BasicSequence.add(BasicSequence.java:100)
> 	at com.ibm.sdo.test.DefectTestApp.main(DefectTestApp.java:60)
> The add(String propertyName, Object value) method seems to be functioning fine using the same Sequence object.  In tracing this issue through EMF, it seems a validate method in the BasicFeatureMap object is failing in the base case and throwing the exception.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org