From 39a3e278e786438a92428fe13646d09f3441d2e6 Mon Sep 17 00:00:00 2001 From: rfeng Date: Tue, 10 Nov 2009 19:42:34 +0000 Subject: Merge the fix from 1.x git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@834626 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'branches/sca-java-1.5.2/modules/core/src') diff --git a/branches/sca-java-1.5.2/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java b/branches/sca-java-1.5.2/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java index 4a90d47fa9..e31186ed35 100644 --- a/branches/sca-java-1.5.2/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java +++ b/branches/sca-java-1.5.2/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java @@ -82,8 +82,8 @@ public class RuntimeWireImpl implements RuntimeWire { private List chains; private InvocationChain bindingInvocationChain; // Cache - private transient final Map invocationChainMap = - new ConcurrentHashMap(); + private transient final Map invocationChainMap = + new ConcurrentHashMap(); /** @@ -135,8 +135,7 @@ public class RuntimeWireImpl implements RuntimeWire { } public InvocationChain getInvocationChain(Operation operation) { - Integer id = operation == null ? new Integer(0) : new Integer(System.identityHashCode(operation)); - InvocationChain cached = invocationChainMap.get(id); + InvocationChain cached = invocationChainMap.get(operation); if (cached == null) { for (InvocationChain chain : getInvocationChains()) { Operation op = null; @@ -148,11 +147,11 @@ public class RuntimeWireImpl implements RuntimeWire { op = chain.getTargetOperation(); } if (interfaceContractMapper.isCompatible(operation, op, op.getInterface().isRemotable())) { - invocationChainMap.put(id, chain); + invocationChainMap.put(operation, chain); return chain; } } - invocationChainMap.put(id, null); + invocationChainMap.put(operation, null); return null; } else { -- cgit v1.2.3