From d7e506ef8ed8449a9a9c2ce06f5eb43dc3e7edf8 Mon Sep 17 00:00:00 2001 From: Stephen Colebourne Date: Wed, 19 Feb 2003 19:54:12 +0000 Subject: [PATCH] Fix bug in remove() from Leo Sutic git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@130972 13f79535-47bb-0310-9956-ffa450edef68 --- .../commons/collections/StaticBucketMap.java | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/java/org/apache/commons/collections/StaticBucketMap.java b/src/java/org/apache/commons/collections/StaticBucketMap.java index 1f99479e1..815da2edb 100644 --- a/src/java/org/apache/commons/collections/StaticBucketMap.java +++ b/src/java/org/apache/commons/collections/StaticBucketMap.java @@ -1,13 +1,10 @@ /* - * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/StaticBucketMap.java,v 1.6 2002/10/18 07:03:12 bayard Exp $ - * $Revision: 1.6 $ - * $Date: 2002/10/18 07:03:12 $ - * + * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//collections/src/java/org/apache/commons/collections/StaticBucketMap.java,v 1.7 2003/02/19 19:54:12 scolebourne Exp $ * ==================================================================== * * The Apache Software License, Version 1.1 * - * Copyright (c) 1999-2002 The Apache Software Foundation. All rights + * Copyright (c) 1999-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,11 +20,11 @@ * distribution. * * 3. The end-user documentation included with the redistribution, if - * any, must include the following acknowlegement: + * any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowlegement may appear in the software itself, - * if and wherever such third-party acknowlegements normally appear. + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. * * 4. The names "The Jakarta Project", "Commons", and "Apache Software * Foundation" must not be used to endorse or promote products derived @@ -36,7 +33,7 @@ * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written - * permission of the Apache Group. + * permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -132,12 +129,14 @@ import java.util.NoSuchElementException; * iterations, or if you can make your own guarantees about how bulk * operations will affect the map.

* - * @author Berin Loritsch - * @author Gerhard Froehlich - * @author Michael A. Smith - * @author Paul Jack - * @version CVS $Revision: 1.6 $ $Date: 2002/10/18 07:03:12 $ - * @since Collections 2.1 + * @since Commons Collections 2.1 + * @version $Revision: 1.7 $ $Date: 2003/02/19 19:54:12 $ + * + * @author Berin Loritsch + * @author Gerhard Froehlich + * @author Michael A. Smith + * @author Paul Jack + * @author Leo Sutic */ public final class StaticBucketMap implements Map { @@ -401,7 +400,7 @@ public final class StaticBucketMap implements Map while( n != null ) { - if( n.key == null || ( n.key != null && n.key.equals( key ) ) ) + if( n.key == key || ( n.key != null && n.key.equals( key ) ) ) { // Remove this node from the linked list of nodes. if( null == prev )