myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Timbul (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Created] (MYFACES-3941) FaceletCacheImpl#isFaceletCached(URL) always returns false
Date Tue, 18 Nov 2014 16:57:33 GMT
Thomas Timbul created MYFACES-3941:
--------------------------------------

             Summary: FaceletCacheImpl#isFaceletCached(URL) always returns false
                 Key: MYFACES-3941
                 URL: https://issues.apache.org/jira/browse/MYFACES-3941
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions: 2.2.6, 2.1.16
            Reporter: Thomas Timbul


Correct definition should be:

{code:title=org.apache.myfaces.view.facelets.impl.FaceletCacheImpl}
public boolean isFaceletCached(URL url)
{
    return _facelets.containsKey(url.toString());
}
{code}

The facelets map {{_facelets}} is actually declared as:
{code}
private Map<String, DefaultFacelet> _facelets;
{code}

For obvious reasons the current implementation will, in effect, always return false.

I don't know if a null check might be appropriate, i.e. 
{code:title=org.apache.myfaces.view.facelets.impl.FaceletCacheImpl}
public boolean isFaceletCached(URL url)
{
    return url!=null && _facelets.containsKey(url.toString());
}
{code}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message