From f2c7b62a245d07d3da79b579785ad2578f38a806 Mon Sep 17 00:00:00 2001 From: antelder Date: Mon, 25 Jan 2010 09:57:45 +0000 Subject: Use uri equals for comparing endpoints so that serialzed/deserilized endpoints work ok git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@902757 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org') diff --git a/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java b/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java index ef5dabeb67..4b5e696d4f 100644 --- a/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java +++ b/sca-java-2.x/trunk/modules/sca-client-impl/src/main/java/org/apache/tuscany/sca/client/impl/SCAClientFactoryImpl.java @@ -84,9 +84,11 @@ public class SCAClientFactoryImpl extends SCAClientFactory { private Node findLocalNode(Endpoint endpoint) { for (Node node : nodeFactory.getNodes().values()) { - if (((NodeImpl)node).getServiceEndpoints().contains(endpoint)) { - return node; - } + for (Endpoint ep : ((NodeImpl)node).getServiceEndpoints()) { + if (endpoint.getURI().equals(ep.getURI())) { + return node; + } + } } return null; } -- cgit v1.2.3