Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-3119

Localizer cache does not include style in cache key when no component is given

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.4.13, 1.5-M3
    • wicket
    • None

    Description

      Localizer uses a cache internally to cache the results of getString() methods. The getCacheKey() method creates the key for the cache entries:

      getCacheKey(final String key, final Component component, final Locale locale, final String style, final String variation)

      When a null component is given, this method creates a cache key from the key param and the locale param, but does not include the style param. When switching between styles, this leads to unexpected behavior.

      I'll attach a patch with test cases.

      Attachments

        1. localizer.patch
          2 kB
          Nick Wiedenbrueck

        Activity

          People

            ivaynberg Igor Vaynberg
            picknick Nick Wiedenbrueck
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: