[ 
https://issues.apache.org/jira/browse/WICKET-2102?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Juergen Donnerstag resolved WICKET-2102.
----------------------------------------

    Resolution: Fixed

thanks

> Localizer never caches resources when component is not given
> ------------------------------------------------------------
>
>                 Key: WICKET-2102
>                 URL: https://issues.apache.org/jira/browse/WICKET-2102
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.5
>            Reporter: Pavel Cernocky
>            Assignee: Juergen Donnerstag
>             Fix For: 1.4-RC3
>
>         Attachments: diff.patch, diff2.patch
>
>
> In org.apache.wicket.Localizer.getString(String, Component, IModel, String) 
> there's this code:
> // If this component is not yet added to page we do not want to check
> // cache as we can generate an invalid cache key
> if ((cache != null) && addedToPage)
> {
>       cacheKey = getCacheKey(key, component);
> }
> If the component is null, then addedToPage is always false, thus cacheKey is 
> never populated and possibly found resource is never put in cache.
> The condition should be:
> if ((cache != null) && (component == null || addedToPage))
> Cheers,
> Palo

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to