Uploaded image for project: 'Tiles'
  1. Tiles
  2. TILES-575

Definition loading from Resolvers inconsistent

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 3.0.3
    • 3.0.3
    • tiles-core

    Description

      When definitions are initially loaded from tiles.xml, exact string matches take precedence over anything resolved by a Resolver (Pattern, etc). However, once a definition has been resolved by the resolver, it is cached in the same definitions hashmap as the exact strings, and any implied precedence is lost.

      Essentially, the first time a definition is resolved, Tiles applies a specific precedence, but subsequent resolutions do not resolve following the same rules.

      This can be seen in CachingLocaleUrlDefinitionDAO.getDefinition():

              Map<String, Definition> definitions = getDefinitions(customizationKey);
              if (definitions != null) {
                  retValue = definitions.get(name);
      
                  if (retValue == null) {
                      retValue = getDefinitionFromResolver(name, customizationKey);
      
                      if (retValue != null) {
                          synchronized (definitions) {
                              definitions.put(name, retValue);
                          }
                      }
                  }
              }
      

      The first time the definition is resolved using definitions.get(name), it does an exact string match. Otherwise subsen

      Attachments

        Activity

          People

            Unassigned Unassigned
            benze Eric B
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: