You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by 侯占斌 <ch...@gmail.com> on 2008/09/28 05:37:14 UTC

No need to validate entry is null in ProxyDirContext.

hi,all.
       In the ProxyDirContext class, the lookupCache method is described
below:

       public CacheEntry lookupCache(String name) {
        CacheEntry entry = cacheLookup(name);
        if (entry == null) {
the line 1378 in ProxyDirContext
            entry = new CacheEntry();
            entry.name = name;
            try {
………………

       I think there is no need to validate whether the entry is null, the
call for the cacheLookup method could return entry which is not null.


-- 
Best Regards!
msn:hzb83@hotmail.com <ms...@hotmail.com>
http://chillwarmoon.javaeye.com
https://sourceforge.net/projects/jamocha