User: mulder  
  Date: 00/06/04 20:20:17

  Modified:    src/main/org/jboss/minerva/pools PoolObjectFactory.java
  Log:
  Make sure pool isn't null in poolStarted and poolClosing.
  
  Revision  Changes    Path
  1.3       +9 -1      jboss/src/main/org/jboss/minerva/pools/PoolObjectFactory.java
  
  Index: PoolObjectFactory.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/minerva/pools/PoolObjectFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- PoolObjectFactory.java    2000/06/03 02:19:03     1.2
  +++ PoolObjectFactory.java    2000/06/05 03:20:16     1.3
  @@ -11,7 +11,7 @@
   /**
    * Creates objects to be used in an object pool.  This is a class instead of
    * an interface so you can ignore any of the methods you don't need.
  - * @version $Revision: 1.2 $
  + * @version $Revision: 1.3 $
    * @author Aaron Mulder ([EMAIL PROTECTED])
    */
   public abstract class PoolObjectFactory {
  @@ -33,8 +33,12 @@
        *    relationship.
        * @param log A writer you can use to log messages.  Use this in preference
        *    to System.xxx.println.
  +     * @throws java.lang.IllegalArgumentException
  +     *         Occurs when the pool is null.
        */
       public void poolStarted(ObjectPool pool, PrintWriter log) {
  +        if(pool == null)
  +            throw new IllegalArgumentException("Cannot start factory with null 
pool!");
       }
   
       /**
  @@ -89,8 +93,12 @@
        * @param pool The pool that is closing.  You may decide to allow
        *    multiple pools you use your factory, or to restrict it to a one-to-one
        *    relationship.
  +     * @throws java.lang.IllegalArgumentException
  +     *         Occurs when the pool is null.
        */
       public void poolClosing(ObjectPool pool) {
  +        if(pool == null)
  +            throw new IllegalArgumentException("Cannot close factory with a null 
pool!");
       }
   
       /**
  
  
  

Reply via email to