zhaohuihua created SHIRO-644:
--------------------------------

             Summary: EhCacheManager.getCache Error Cache cacheName already 
exists
                 Key: SHIRO-644
                 URL: https://issues.apache.org/jira/browse/SHIRO-644
             Project: Shiro
          Issue Type: Bug
          Components: Caching 
    Affects Versions: 1.4.0-RC2, 1.4.0
            Reporter: zhaohuihua


1.4.0-RC2 EhCacheManager.java line 155~172

 
net.sf.ehcache.Ehcache cache = ensureCacheManager().getEhcache(name);
if (cache == null) {
    {color:#FF0000}synchronized (name.intern()) {color}{
        cache = manager.getCache(name);
        if (cache == null) {
            if (log.isInfoEnabled()) {
                log.info("Cache with name '{}' does not yet exist.  Creating 
now.", name);
            }
            this.manager.addCache(name);
 
            cache = manager.getCache(name);
 
            if (log.isInfoEnabled()) {
                log.info("Added EhCache named [" + name + "]");
            }
        }
    }
} else {
    if (log.isInfoEnabled()) {
        log.info("Using existing EHCache named [" + cache.getName() + "]");
    }}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to