You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Raymond Feng (JIRA)" <de...@tuscany.apache.org> on 2010/06/23 00:17:53 UTC

[jira] Reopened: (TUSCANY-3231) OASIS otest ASM_5029_TestCase fails as Tuscany is not noticing that a composite property with isMany=false has multiple elements

     [ https://issues.apache.org/jira/browse/TUSCANY-3231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Raymond Feng reopened TUSCANY-3231:
-----------------------------------


We should also remove the hack in CompositeProcessor around line 493:

                   // Read <value>
                    if (VALUE_QNAME.equals(name)) {
                    	if (gotOneValue && !isMany) {
                    	    // TODO: TUSCANY-3231 this should be error not warning but that breaks OASIS tests
                    	    warning(context.getMonitor(), "ASM50032: multiple value elements for single-valued property", name, name);
                    	}
                        loadElement(reader, root);
                        gotOneValue = true;
                    } else {
                        // Global elements
                        loadElement(reader, root);
                    }

We should not issue warning here as the component property may inherit @many from the componentType property. Simon's fix in ComponentBudlerImpl is the right place to validate.

> OASIS otest ASM_5029_TestCase fails as Tuscany is not noticing that a composite property with isMany=false has multiple <value> elements 
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-3231
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3231
>             Project: Tuscany
>          Issue Type: Bug
>          Components: OASIS Compliance - OASIS
>            Reporter: ant elder
>            Assignee: Simon Laws
>             Fix For: Java-SCA-2.0
>
>
> OASIS otest ASM_5029_TestCase fails as Tuscany is not noticing that a composite property with isMany=false has multiple <value> elements 
> The code goes wrong in CompositeProcessor.read line 372
>                                 Document value = readPropertyValue(property.getXSDElement(), property.getXSDType(), property.isMany(), reader);
> and in readPropertyValue line 589 it does 
>                         loadElement(reader, root);
> and nothing ends up checking that the the next start element is another <value> element which should be an error when isMany is false.
> The stax parser reading code around all this is quite convoluted so no fix for this yet.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.