You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@apache.org on 2001/01/29 12:54:11 UTC

cvs commit: xml-xalan/java/src/org/apache/xml/utils ObjectPool.java

sboag       01/01/29 03:54:11

  Modified:    java/src/org/apache/xml/utils ObjectPool.java
  Log:
  Added construction that takes the name of a class instead of a
  class, which the JProbe Threadalizer seems to like better, for
  some reason.
  
  Revision  Changes    Path
  1.4       +19 -1     xml-xalan/java/src/org/apache/xml/utils/ObjectPool.java
  
  Index: ObjectPool.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/utils/ObjectPool.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ObjectPool.java	2001/01/02 03:42:50	1.3
  +++ ObjectPool.java	2001/01/29 11:54:07	1.4
  @@ -76,7 +76,6 @@
     /**
      * Constructor ObjectPool
      *
  -   *
      * @param type Type of objects for this pool
      */
     public ObjectPool(Class type)
  @@ -84,6 +83,25 @@
       objectType = type;
       freeStack = new Vector();
     }
  +  
  +  /**
  +   * Constructor ObjectPool
  +   *
  +   * @param className Fully qualified name of the type of objects for this pool.
  +   */
  +  public ObjectPool(String className)
  +  {
  +    try
  +    {
  +      objectType = Class.forName(className);
  +    }
  +    catch(ClassNotFoundException cnfe)
  +    {
  +      throw new WrappedRuntimeException(cnfe);
  +    }
  +    freeStack = new Vector();
  +  }
  +
   
     /**
      * Constructor ObjectPool