DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40170>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40170





------- Additional Comments From [EMAIL PROTECTED]  2006-08-02 18:00 -------
I've noticed that I can configure my Context
(StandardContext) to increase the max cache size (cacheMaxSize parameter) 
which seems to help quite a bit with this problem.  Is this the recommended 
solution or should a code change also be considered to alleviate this 
problem?  I would suggest that the ResourceCache.lookup method should create a 
reference to the current cache which it should use rather than working on the 
global cache reference which may change.  Something like this:

/* current code, ResourceCache.java line 286 */ CacheEntry cacheEntry = 
null; ...
int pos = find(cache, name);
/* ArrayIndexOutOfBoundsException occurs when backing array modified between 
these lines */ if ((pos != -1) && (name.equals(cache[pos].name))) {
    cacheEntry = cache[pos];
}

/* new code */
CacheEntry cacheEntry = null;
CacheEntry[] currentCache = cache;
...
int pos = find(currentCache, name);
if ((pos != -1) && (name.equals(currentCache[pos].name))) {
    cacheEntry = currentCache[pos];
}



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to