You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by rs...@apache.org on 2002/08/02 00:47:24 UTC

cvs commit: jakarta-commons/discovery/src/java/org/apache/commons/discovery Discovery.java

rsitze      2002/08/01 15:47:24

  Modified:    discovery/src/java/org/apache/commons/discovery
                        Discovery.java
  Log:
  Minor cleanup
  
  Revision  Changes    Path
  1.8       +8 -4      jakarta-commons/discovery/src/java/org/apache/commons/discovery/Discovery.java
  
  Index: Discovery.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/discovery/src/java/org/apache/commons/discovery/Discovery.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Discovery.java	1 Aug 2002 22:18:12 -0000	1.7
  +++ Discovery.java	1 Aug 2002 22:47:24 -0000	1.8
  @@ -220,8 +220,8 @@
    * </ul>
    * </p>
    * 
  - * <p><strong>IMPLEMENTATION NOTE</strong> - This implementation is heavily
  - * based on the SAXParserFactory and DocumentBuilderFactory implementations
  + * <p><strong>IMPLEMENTATION NOTE</strong> - This implementation is modelled
  + * after the SAXParserFactory and DocumentBuilderFactory implementations
    * (corresponding to the JAXP pluggability APIs) found in Apache Xerces.
    * </p>
    * 
  @@ -875,8 +875,12 @@
       /**
        * Allows null key, important as default groupContext is null.
        */
  -    private static final HashMap spi_caches = new HashMap(13);
  +    private static final HashMap spi_caches = new HashMap();
   
  +    /**
  +     * Initial hash size for SPI's, default just seem TO big today..
  +     */
  +    private static final int smallHashSize = 13;
       
       /**
        * Get service keyed by spi & classLoader.
  @@ -921,7 +925,7 @@
                       (HashMap)spi_caches.get(spiContext.getThreadContextClassLoader());
   
                   if (spis == null) {
  -                    spis = new HashMap(13);
  +                    spis = new HashMap(smallHashSize);
                       spi_caches.put(spiContext.getThreadContextClassLoader(), spis);
                   }
   
  
  
  

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