tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amy...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources ProxyDirContext.java
Date Thu, 24 Apr 2003 06:58:19 GMT
amyroh      2003/04/23 23:58:18

  Modified:    catalina/src/share/org/apache/naming/resources
                        ProxyDirContext.java
  Log:
  Minor fix to avoid NegativeArraySizeException when cache.length is 0.
  
  Revision  Changes    Path
  1.8       +7 -7      jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java
  
  Index: ProxyDirContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/naming/resources/ProxyDirContext.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ProxyDirContext.java	23 Apr 2003 17:37:18 -0000	1.7
  +++ ProxyDirContext.java	24 Apr 2003 06:58:18 -0000	1.8
  @@ -783,7 +783,7 @@
       public Name composeName(Name name, Name prefix)
           throws NamingException {
           prefix = (Name) name.clone();
  -	return prefix.addAll(name);
  +    return prefix.addAll(name);
       }
   
   
  @@ -1684,8 +1684,9 @@
        * Remove entry from cache.
        */
       protected boolean cacheUnload(String name) {
  -        if (cache == null)
  +        if ((cache == null) || (cache.length==0)) {
               return false;
  +        }
           synchronized (this) {
               CacheEntry[] newCache = new CacheEntry[cache.length - 1];
               CacheEntry removedEntry = removeMap(cache, newCache, name);
  @@ -1904,4 +1905,3 @@
   
   
   }
  -
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message