From 2b6d025cd1781a3bee309855822bbda90ae2a2b9 Mon Sep 17 00:00:00 2001 From: nathan Date: Sat, 2 Apr 2016 16:57:29 +0200 Subject: [PATCH] Cleaned up local name --- .../src/dorkbox/util/collections/ConcurrentIterator.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dorkbox-Util/src/dorkbox/util/collections/ConcurrentIterator.java b/Dorkbox-Util/src/dorkbox/util/collections/ConcurrentIterator.java index 2a1233a..ec6e8c0 100644 --- a/Dorkbox-Util/src/dorkbox/util/collections/ConcurrentIterator.java +++ b/Dorkbox-Util/src/dorkbox/util/collections/ConcurrentIterator.java @@ -89,18 +89,18 @@ class ConcurrentIterator { ConcurrentEntry concurrentEntry = entries.get(listener); if (concurrentEntry != null) { - ConcurrentEntry head1 = headREF.get(this); + ConcurrentEntry head = headREF.get(this); - if (concurrentEntry == head1) { + if (concurrentEntry == head) { // if it was second, now it's first - head1 = head1.next(); + head = head.next(); //oldHead.clear(); // optimize for GC not possible because of potentially running iterators } else { concurrentEntry.remove(); } - headREF.lazySet(this, head1); + headREF.lazySet(this, head); this.entries.remove(listener); } }