Use createEntry method from init to create the map entry

bug 33706, reported by William Barsse

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@158688 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stephen Colebourne 2005-03-22 22:14:15 +00:00
parent c286b8023f
commit d6b6fe90bc
2 changed files with 7 additions and 1 deletions

View File

@ -30,6 +30,7 @@ All feedback should be directed to commons-user at jakarta.apache.org.
<p>
This release is fully source and binary compatible with v3.1.
(Checks performed using JDiff and Clirr, thanks).
Please check the bug fixes to ensure you weren't relying on the behaviour of a bug.
</p>
<p>
There are no new deprecations.
@ -55,6 +56,7 @@ There are no new deprecations.
<li>BoundedFifoBuffer - Fix iterator remove bug causing ArrayIndexOutOfBounds error [33071]</li>
<li>MultiHashMap.remove(key, item) - Was returning the item even when nothing was removed [32366]</li>
<li>SetUniqueList.set(int,Object) - Destroyed set status in certain circumstances [33294]</li>
<li>AbstractLinkedMap.init() - Now calls createEntry() to create the map entry object [33706]</li>
</ul>
<center><h3>JAVADOC</h3></center>

View File

@ -120,9 +120,13 @@ public class AbstractLinkedMap extends AbstractHashedMap implements OrderedMap {
/**
* Initialise this subclass during construction.
* <p>
* NOTE: As from v3.2 this method calls
* {@link #createEntry(HashEntry, int, Object, Object)} to create
* the map entry object.
*/
protected void init() {
header = new LinkEntry(null, -1, null, null);
header = (LinkEntry) createEntry(null, -1, null, null);
header.before = header.after = header;
}