From 7377cce7fcdca21dcb18bdc69455bfa243bc180c Mon Sep 17 00:00:00 2001 From: Peter Lawrey Date: Thu, 9 May 2019 17:03:40 +0100 Subject: [PATCH] Remove an implied Iterator which Escape Analysis might not remove, closes https://github.com/OpenHFT/Chronicle-Map/issues/177 --- .../net/openhft/chronicle/hash/impl/stage/hash/Chaining.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 src/main/java/net/openhft/chronicle/hash/impl/stage/hash/Chaining.java diff --git a/src/main/java/net/openhft/chronicle/hash/impl/stage/hash/Chaining.java b/src/main/java/net/openhft/chronicle/hash/impl/stage/hash/Chaining.java old mode 100644 new mode 100755 index 11e479ea1..921a73881 --- a/src/main/java/net/openhft/chronicle/hash/impl/stage/hash/Chaining.java +++ b/src/main/java/net/openhft/chronicle/hash/impl/stage/hash/Chaining.java @@ -131,7 +131,8 @@ public abstract class Chaining extends ChainingInterface { Class contextClass, BiFunction createChaining, VanillaChronicleMap map) { - for (ChainingInterface context : contextChain) { + for (int i = 0; i < contextChain.size(); i++) { + ChainingInterface context = contextChain.get(i); if (context.getClass() == contextClass && !context.usedInit()) { return initUsedAndReturn(map, context); }