diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-09 17:59:57 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-09 17:59:57 +0000 |
commit | e2a82e1954ef1ac97c26d4f6bca4184494b541b9 (patch) | |
tree | e09045556ef5d683911c6476fa052c64ac1d6c56 /java/sca/modules/assembly-xml/src | |
parent | 2c4fb4511421e0e82c46f0e3297b2faf6a40418e (diff) |
TUSCANY-3258 raise an error when a component property type doesn't match the component type property type. This may need to be looked at further if we decide to consider if the types are compatible.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@823643 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/assembly-xml/src')
2 files changed, 0 insertions, 21 deletions
diff --git a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java index ffffd06404..ef039818cc 100644 --- a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java +++ b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java @@ -1019,8 +1019,6 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt //component and not lost implementation = resolveImplementation(implementation, resolver); - validatePropertyTypes(component, implementation); - component.setImplementation(implementation); } @@ -1045,24 +1043,6 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt } // end try } - /** - * ASM50036: The property type specified for the property element of a component MUST be - * compatible with the type of the property with the same @name declared in the component - * type of the implementation used by the component. - */ - private void validatePropertyTypes(Component component, Implementation implementation) { - for (Property cp : component.getProperties()) { - Property ip = implementation.getProperty(cp.getName()); - if (cp != null && ip != null && cp.getXSDType() != null && ip.getXSDType() != null) { - if (!cp.getXSDType().equals(ip.getXSDType())) { - // FIXME: how to test for incompatible instead of not equal - // TODO: TUSCANY-3236, should be error not warning - warning("IncompatiblePropertyType", component, component.getName(), cp.getName()); - } - } - } - } - public QName getArtifactType() { return COMPOSITE_QNAME; } diff --git a/java/sca/modules/assembly-xml/src/main/resources/org/apache/tuscany/sca/assembly/xml/assembly-xml-validation-messages.properties b/java/sca/modules/assembly-xml/src/main/resources/org/apache/tuscany/sca/assembly/xml/assembly-xml-validation-messages.properties index fe29a3be28..f12e94d968 100644 --- a/java/sca/modules/assembly-xml/src/main/resources/org/apache/tuscany/sca/assembly/xml/assembly-xml-validation-messages.properties +++ b/java/sca/modules/assembly-xml/src/main/resources/org/apache/tuscany/sca/assembly/xml/assembly-xml-validation-messages.properties @@ -29,4 +29,3 @@ ContributionResolveException = ContributionResolveException occured due to : {0} ContributionWriteException = ContributionWriteException occured due to : {0} XMLStreamException = XMLStreamException occured due to : {0} DuplicateCompositeName = [ASM_6001] More than one composite with the same name {0} found in contribution {1} -IncompatiblePropertyType = [ASM_5036] Component {0} property {1} type is not compatible with implementation property type |