tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filip Hanik - Dev Lists <devli...@hanik.com>
Subject Re: svn commit: r427821 - /tomcat/tc6.0.x/trunk/java/org/apache/naming/resources/ResourceCache.java
Date Wed, 02 Aug 2006 14:44:46 GMT
yes please, that way we can fix it in 5.0 and 5.5


James Courtney wrote:
> Fantastic, thanks Remy!
>
> Do you guys still want a bug filed for that?
>
> Jamey
>  
>
> -----Original Message-----
> From: remm@apache.org [mailto:remm@apache.org] 
> Sent: Tuesday, August 01, 2006 5:39 PM
> To: tomcat-dev@jakarta.apache.org
> Subject: svn commit: r427821 -
> /tomcat/tc6.0.x/trunk/java/org/apache/naming/resources/ResourceCache.jav
> a
>
> Author: remm
> Date: Tue Aug  1 17:39:28 2006
> New Revision: 427821
>
> URL: http://svn.apache.org/viewvc?rev=427821&view=rev
> Log:
> - Use a single reference to the cache during lookup (the cache array
> could be concurrently replaced).
>
> Modified:
>  
> tomcat/tc6.0.x/trunk/java/org/apache/naming/resources/ResourceCache.java
>
> Modified:
> tomcat/tc6.0.x/trunk/java/org/apache/naming/resources/ResourceCache.java
> URL:
> http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/naming
> /resources/ResourceCache.java?rev=427821&r1=427820&r2=427821&view=diff
> ========================================================================
> ======
> ---
> tomcat/tc6.0.x/trunk/java/org/apache/naming/resources/ResourceCache.java
> (original)
> +++ tomcat/tc6.0.x/trunk/java/org/apache/naming/resources/ResourceCache.
> +++ java Tue Aug  1 17:39:28 2006
> @@ -289,10 +289,11 @@
>      public CacheEntry lookup(String name) {
>  
>          CacheEntry cacheEntry = null;
> +        CacheEntry[] currentCache = cache;
>          accessCount++;
> -        int pos = find(cache, name);
> -        if ((pos != -1) && (name.equals(cache[pos].name))) {
> -            cacheEntry = cache[pos];
> +        int pos = find(currentCache, name);
> +        if ((pos != -1) && (name.equals(currentCache[pos].name))) {
> +            cacheEntry = currentCache[pos];
>          }
>          if (cacheEntry == null) {
>              try {
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional
> commands, e-mail: dev-help@tomcat.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>
>
>   


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


Mime
View raw message