summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-08-04 05:54:29 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-08-04 05:54:29 +0000
commit63c7a4310ef190607ef1d76b69dd37f2a09a0561 (patch)
treee4793539b3071e1c6b87b6c0c53eec28ac3f7e07 /java/sca
parent9d018863477c5d6056d18dbbcc0c4d5d5be9cfd2 (diff)
Start to work on ASM50033
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@800682 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
-rw-r--r--java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java7
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseBuilderImpl.java4
2 files changed, 10 insertions, 1 deletions
diff --git a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java
index b4fe17770c..0f3eb8ea30 100644
--- a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java
+++ b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java
@@ -581,6 +581,13 @@ abstract class BaseAssemblyProcessor extends BaseStAXArtifactProcessor {
break;
}
isTextForProperty = false;
+
+ // CONFORMANCE: ASM50033
+ // A property <value/> subelement MUST NOT be used when the @value attribute is used
+ // to specify the value for that property.
+ if (valueAttr != null) {
+ error("ASM50033: value attribute exists for the property element", name, name);
+ }
// Read <value>
if (VALUE_QNAME.equals(name)) {
loadElement(reader, root);
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseBuilderImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseBuilderImpl.java
index 09b19dd7b3..161cf73b17 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseBuilderImpl.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseBuilderImpl.java
@@ -379,7 +379,9 @@ public abstract class BaseBuilderImpl implements CompositeBuilder {
if (!componentProperties.containsKey(property.getName())) {
ComponentProperty componentProperty = assemblyFactory.createComponentProperty();
componentProperty.setName(property.getName());
+ componentProperty.setValue(property.getValue());
componentProperty.setMany(property.isMany());
+ componentProperty.setMustSupply(property.isMustSupply());
componentProperty.setXSDElement(property.getXSDElement());
componentProperty.setXSDType(property.getXSDType());
componentProperty.setProperty(property);
@@ -419,7 +421,7 @@ public abstract class BaseBuilderImpl implements CompositeBuilder {
// Check that a value is supplied
if (componentProperty.getValue() == null && property.isMustSupply()) {
- warning(monitor, "PropertyMustSupplyNull", component, component.getName(), componentProperty
+ error(monitor, "PropertyMustSupplyNull", component, component.getName(), componentProperty
.getName());
}