No runtime error/warning when a componentType element defines an
@constraningType attribute but the constrainingType element is missing in the
Domain
-----------------------------------------------------------------------------------------------------------------------------------------------------
Key: TUSCANY-2756
URL: https://issues.apache.org/jira/browse/TUSCANY-2756
Project: Tuscany
Issue Type: Bug
Components: Java SCA Assembly Model
Affects Versions: Java-SCA-1.3
Reporter: Yiwen Huang
Priority: Minor
As reported and discussed in JIRA 2686
(https://issues.apache.org/jira/browse/TUSCANY-2686), when a componentType
element contains an @constrainingType attribute, but a constrainingType element
is not defined (eg. a .constrainingType file does not exist for the
componentType), the Tuscany runtime does not report an error/warning during
loading/resolving.
This does not satisfy conformance test ASM40002:
"If present, the @constrainingType attribute of a <componentType/> element MUST
reference a <constrainingType/> element in the Domain through its QName"
During my attempt to look at the Tuscany runtime code, I saw in the
org.apache.tuscany.sca.assembly.xml.ComponentTypeProcessor class,
read(XMLStreamReader reader) method, it does the following:
// Read a <componentType>
componentType =
assemblyFactory.createComponentType();
componentType.setConstrainingType(readConstrainingType(reader));
where componentType.setConstrainingType() simply stores the constrainingType
attribute, and doesn't seem to check if a .constrainingType file exists.
This is where I got to. Not sure how helpful it is as if I'm looking in the
right place or not.
Let me know if there is any questions, thanks!
Best Regards,
Yiwen
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.