summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/builder/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk/modules/builder/src/main')
-rw-r--r--sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentPolicyBuilderImpl.java19
1 files changed, 16 insertions, 3 deletions
diff --git a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentPolicyBuilderImpl.java b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentPolicyBuilderImpl.java
index 09d37bb463..e908122861 100644
--- a/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentPolicyBuilderImpl.java
+++ b/sca-java-2.x/trunk/modules/builder/src/main/java/org/apache/tuscany/sca/builder/impl/ComponentPolicyBuilderImpl.java
@@ -532,10 +532,23 @@ public class ComponentPolicyBuilderImpl {
} else {
// Need to check the ExtensionType to see if the intent is provided there. If not, throw an error
ExtensionType type = subject.getExtensionType();
- if ( type == null )
- error(context.getMonitor(), "IntentNotSatisfiedAtBuild", subject, intent.getName(), subject.toString());
- else if ( !type.getAlwaysProvidedIntents().contains(intent) && !type.getMayProvidedIntents().contains(intent))
+
+
+ if ( type == null ) {
error(context.getMonitor(), "IntentNotSatisfiedAtBuild", subject, intent.getName(), subject.toString());
+ } else {
+ // The ExtensionType on the subject only has the binding name. The one in the system
+ // definitions will have the mayProvide/alwaysProvides values
+ for ( ExtensionType et : context.getDefinitions().getBindingTypes() ) {
+ if ( type.getType().equals(et.getType()) ) {
+ type = et;
+ }
+ }
+
+ if ( !type.getAlwaysProvidedIntents().contains(intent) && !type.getMayProvidedIntents().contains(intent)) {
+ error(context.getMonitor(), "IntentNotSatisfiedAtBuild", subject, intent.getName(), subject.toString());
+ }
+ }
}
}
}