diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-10 19:36:52 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-10 19:36:52 +0000 |
commit | 1258cb57e21dd789d04faf194c119e64809191c0 (patch) | |
tree | fb943d65ff6c114bc4b088fdf17fe7036b8343a4 /branches/sca-java-1.x/modules | |
parent | 195774c489a1a671aca514b0afa88332bf9c6ee3 (diff) |
Remove the identity key as the Operation.equals() already takes care of that
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@834624 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules')
-rw-r--r-- | branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java b/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java index 4a90d47fa9..e31186ed35 100644 --- a/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java +++ b/branches/sca-java-1.x/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/RuntimeWireImpl.java @@ -82,8 +82,8 @@ public class RuntimeWireImpl implements RuntimeWire { private List<InvocationChain> chains; private InvocationChain bindingInvocationChain; // Cache - private transient final Map<Integer, InvocationChain> invocationChainMap = - new ConcurrentHashMap<Integer, InvocationChain>(); + private transient final Map<Operation, InvocationChain> invocationChainMap = + new ConcurrentHashMap<Operation, InvocationChain>(); /** @@ -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 { |