tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "侯占斌" <chillwarm...@gmail.com>
Subject No need to validate entry is null in ProxyDirContext.
Date Sun, 28 Sep 2008 03:37:14 GMT
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 <msn%3Ahzb83@hotmail.com>
http://chillwarmoon.javaeye.com
https://sourceforge.net/projects/jamocha
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message