User: slaboure
  Date: 02/01/06 08:04:22

  Modified:    src/main/org/jboss/ejb/plugins
                        CMPClusteredInMemoryPersistenceManager.java
  Log:
  Bug in findAll when no beans in store
  
  Revision  Changes    Path
  1.4       +9 -2      
jbossmx/src/main/org/jboss/ejb/plugins/CMPClusteredInMemoryPersistenceManager.java
  
  Index: CMPClusteredInMemoryPersistenceManager.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jbossmx/src/main/org/jboss/ejb/plugins/CMPClusteredInMemoryPersistenceManager.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CMPClusteredInMemoryPersistenceManager.java       2002/01/03 04:00:52     1.3
  +++ CMPClusteredInMemoryPersistenceManager.java       2002/01/06 16:04:22     1.4
  @@ -11,6 +11,7 @@
   import java.lang.reflect.Method;
   import java.io.IOException;
   import java.util.ArrayList;
  +import java.util.Collection;
   
   import javax.ejb.EJBException;
   
  @@ -29,7 +30,7 @@
    * @see org.jboss.ha.framework.interfaces.DistributedState
    *
    * @author  <a href="mailto:[EMAIL PROTECTED]";>Sacha Labourey</a>.
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    *
    * <p><b>Revisions:</b>
    *
  @@ -303,7 +304,13 @@
      {
         if (finderMethod.getName ().equals ("findAll"))
         {
  -         ArrayList result = new ArrayList (this.ds.getAllKeys (DS_CATEGORY));
  +         Collection tmpColl = this.ds.getAllKeys (DS_CATEGORY);
  +         
  +         ArrayList result = null;
  +         if (tmpColl == null)
  +            result = new ArrayList ();
  +         else
  +            result = new ArrayList (tmpColl);
            
            return new FinderResults (result,null,null,null);
         } else
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to