[ https://issues.apache.org/jira/browse/TILES-575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric B updated TILES-575: ------------------------- 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(): {code} 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); } } } } {code} The first time the definition is resolved using definitions.get(name), it does an exact string match. Otherwise subsen was: 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(): > Definition loading from Resolvers inconsistent > ---------------------------------------------- > > Key: TILES-575 > URL: https://issues.apache.org/jira/browse/TILES-575 > Project: Tiles > Issue Type: Bug > Components: tiles-core > Affects Versions: 3.0.3 > Reporter: Eric B > Labels: patch > > 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(): > {code} > 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); > } > } > } > } > {code} > The first time the definition is resolved using definitions.get(name), it > does an exact string match. Otherwise subsen -- This message was sent by Atlassian JIRA (v6.1#6144)