summaryrefslogtreecommitdiffstats
path: root/java/sca/modules
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-08-26 14:54:18 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-08-26 14:54:18 +0000
commit1558a09905b8dcc0a5ca917364293704fe076c07 (patch)
tree3829da9d17111109c22bafb29a68021a07fb1132 /java/sca/modules
parent130f96c02971b259b328283c50b702bb9b5c22fb (diff)
TUSCANY-2501 reference should either be all annotated or all not annotated. Here change the vtests to test these cases separately. Currently mixing annotated and unannotated fields as references causes any unannotated reference to be overlooked. Change the reference not found warning to an error to catch cases where they are mixed by accident. Changes to other tests to take account of this. Also change implementation.widget to pick up the string name of the reference in javascript rather than the name of the variable to which the reference is assigned.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@689102 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules')
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java2
-rw-r--r--java/sca/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationIntrospector.java6
2 files changed, 5 insertions, 3 deletions
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java
index d7334467a7..925ca9dc67 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java
@@ -441,7 +441,7 @@ public abstract class BaseConfigurationBuilderImpl {
componentReference.setReference(reference);
} else {
if (!componentReference.getName().startsWith("$self$.")) {
- warning("ReferenceNotFound", component, component.getName(), componentReference.getName());
+ error("ReferenceNotFound", component, component.getName(), componentReference.getName());
}
}
}
diff --git a/java/sca/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationIntrospector.java b/java/sca/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationIntrospector.java
index eed0d6871b..abe00bac5b 100644
--- a/java/sca/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationIntrospector.java
+++ b/java/sca/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationIntrospector.java
@@ -130,8 +130,10 @@ class WidgetImplementationIntrospector {
String referenceName = null;
String tokens[] = scriptContent.split("=");
- tokens = tokens[0].split(" ");
- referenceName = tokens[tokens.length -1];
+
+ // find the string between the quotes
+ tokens = tokens[1].split("\"");
+ referenceName = tokens[1];
if(referenceName != null) {
reference = assemblyFactory.createReference();