You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by co...@apache.org on 2002/06/19 14:55:49 UTC

cvs commit: jakarta-avalon-excalibur/cache/src/test/org/apache/excalibur/cache/validator/test TimeoutValidatorTestCase.java

colus       2002/06/19 05:55:48

  Modified:    cache/src/java/org/apache/excalibur/cache
                        ValidatingCache.java
               cache/src/test/org/apache/excalibur/cache/validator/test
                        TimeoutValidatorTestCase.java
  Log:
  Do not validate null value.
  
  Revision  Changes    Path
  1.8       +1 -1      jakarta-avalon-excalibur/cache/src/java/org/apache/excalibur/cache/ValidatingCache.java
  
  Index: ValidatingCache.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/cache/src/java/org/apache/excalibur/cache/ValidatingCache.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ValidatingCache.java	1 May 2002 04:01:32 -0000	1.7
  +++ ValidatingCache.java	19 Jun 2002 12:55:48 -0000	1.8
  @@ -79,7 +79,7 @@
       {
           Object value = m_cache.get( key );
   
  -        if( !validate( key, value ) )
  +        if( null != value && !validate( key, value ) )
           {
               remove( key );
               value = null;
  
  
  
  1.9       +2 -0      jakarta-avalon-excalibur/cache/src/test/org/apache/excalibur/cache/validator/test/TimeoutValidatorTestCase.java
  
  Index: TimeoutValidatorTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/cache/src/test/org/apache/excalibur/cache/validator/test/TimeoutValidatorTestCase.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TimeoutValidatorTestCase.java	1 May 2002 04:01:33 -0000	1.8
  +++ TimeoutValidatorTestCase.java	19 Jun 2002 12:55:48 -0000	1.9
  @@ -40,6 +40,7 @@
           Thread.sleep( 100 );
   
           assertNotNull( cache.get( "K1" ) );
  +        assertNull( cache.get( "K2" ) );
       }
   
       public void testExpired()
  @@ -56,5 +57,6 @@
           Thread.sleep( 2000 );
   
           assertNull( cache.get( "K1" ) );
  +        assertNull( cache.get( "K2" ) );
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>