summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
index 4ce163f389..5118571e1f 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/runtime/impl/EndpointReferenceBinderImpl.java
@@ -495,14 +495,15 @@ public class EndpointReferenceBinderImpl implements EndpointReferenceBinder {
}
// TUSCANY-4069 if no binding specified on reference then use service binding.sca if that exists
- if (endpointReference.getBinding() == null && endpointReference.getReference().getAutowire() == true){
- for (Endpoint endpoint : matchedEndpoints){
- if (endpoint.getBinding() instanceof SCABinding){
+ if (endpointReference.getBinding() == null && Boolean.TRUE.equals(endpointReference.getReference()
+ .getAutowire())) {
+ for (Endpoint endpoint : matchedEndpoints) {
+ if (endpoint.getBinding() instanceof SCABinding) {
matchedEndpoint = endpoint;
break;
}
}
- }
+ }
if (matchedEndpoint == null) {
// just take the first matched endpoint from the list