I'm currently porting one of Rogue Wave's tests for SDO sequence support
over to the CTS and I've encountered an error when running this against
Tuscany.
 
The code defines an open, sequenced type, e.g.
 
        DataObject typeDef = dataFactory.create( "commonj.sdo", "Type"
);
        typeDef.set( "uri", "http://www.example.com/cts/SequenceAddTest";
);
        typeDef.set( "name", "OpenDataObject" );
        typeDef.set( "open", true );
        typeDef.set( "sequenced", true );
        Type openType = typeHelper.define( typeDef );

And then attempts to add a value to the sequence:
 
        Sequence testSequence = testOpenDataObject.getSequence();
        testSequence.add("testBoolean1", Boolean.TRUE);
 
This results in a NullPointerException in the EMF library:
 
java.lang.NullPointerException
 at
org.eclipse.emf.ecore.util.FeatureMapUtil.isFeatureMap(FeatureMapUtil.ja
va:120)
 at
org.eclipse.emf.ecore.util.BasicFeatureMap.add(BasicFeatureMap.java:1101
)
 at org.apache.tuscany.sdo.util.BasicSequence.add(BasicSequence.java:90)
 at
test.sdo21.tests.api.SequenceAddTest.testAddBooleanByName(SequenceAddTes
t.java:80)

Is this a bug in Tuscany or am I doing something wrong in my code?
 
Thanks,
 
Andy.

Reply via email to