avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/collections/src/java/org/apache/avalon/excalibur/collections BucketMap.java
Date Thu, 07 Nov 2002 16:52:42 GMT
leif        2002/11/07 08:52:42

  Modified:    collections/src/java/org/apache/avalon/excalibur/collections
                        BucketMap.java
  Log:
  Objects created by java.lang.reflect.Proxy return false you call p.equals( p ) even
  though they are the same object.  This was causing gets to fail when they were
  used.  The fix was to add equality comparisons ((p == p) || (p.equals(p)))
  
  Revision  Changes    Path
  1.24      +6 -6      jakarta-avalon-excalibur/collections/src/java/org/apache/avalon/excalibur/collections/BucketMap.java
  
  Index: BucketMap.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/collections/src/java/org/apache/avalon/excalibur/collections/BucketMap.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- BucketMap.java	8 Oct 2002 03:15:50 -0000	1.23
  +++ BucketMap.java	7 Nov 2002 16:52:42 -0000	1.24
  @@ -153,7 +153,7 @@
               {
                   n = next;
   
  -                if( n.key.equals( key ) )
  +                if( ( n.key == key ) || ( n.key.equals( key ) ) )
                   {
                       // do not adjust size because nothing was added
                       Object returnVal = n.value;
  @@ -192,7 +192,7 @@
   
               while( n != null && n.key != null )
               {
  -                if( n.key.equals( key ) )
  +                if( ( n.key == key ) || ( n.key.equals( key ) ) )
                   {
                       return n.value;
                   }
  @@ -222,7 +222,7 @@
   
               while( n != null && n.key != null )
               {
  -                if( n.key.equals( key ) )
  +                if( ( n.key == key ) || ( n.key.equals( key ) ) )
                   {
                       return true;
                   }
  @@ -254,7 +254,7 @@
   
                   while( n != null && n.key != null )
                   {
  -                    if( n.value.equals( value ) )
  +                    if( ( n.value == value ) || ( n.value.equals( value ) ) )
                       {
                           return true;
                       }
  @@ -352,7 +352,7 @@
   
               while( n != null && n.key != null )
               {
  -                if( n.key.equals( key ) )
  +                if( ( n.key == key ) || ( n.key.equals( key ) ) )
                   {
                       // Remove this node from the linked list of nodes.
                       if( null == prev )
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message