Author: jdonnerstag Date: Wed Jun 22 20:10:50 2011 New Revision: 1138606 URL: http://svn.apache.org/viewvc?rev=1138606&view=rev Log: fixed: MarkupCacheProvider should create keys following resource name standard Issue: WICKET-3821
Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/DefaultMarkupCacheKeyProvider.java Modified: wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/DefaultMarkupCacheKeyProvider.java URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/DefaultMarkupCacheKeyProvider.java?rev=1138606&r1=1138605&r2=1138606&view=diff ============================================================================== --- wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/DefaultMarkupCacheKeyProvider.java (original) +++ wicket/trunk/wicket-core/src/main/java/org/apache/wicket/markup/DefaultMarkupCacheKeyProvider.java Wed Jun 22 20:10:50 2011 @@ -53,11 +53,20 @@ public class DefaultMarkupCacheKeyProvid final StringBuilder buffer = new StringBuilder(classname.length() + 64); buffer.append(classname); - final Locale locale = container.getLocale(); + if (container.getVariation() != null) + { + buffer.append('_').append(container.getVariation()); + } + + if (container.getStyle() != null) + { + buffer.append('_').append(container.getStyle()); + } + final Locale locale = container.getLocale(); if (locale != null) { - buffer.append('-').append(locale.getLanguage()); + buffer.append('_').append(locale.getLanguage()); final boolean hasLocale = locale.getLanguage().length() != 0; final boolean hasCountry = locale.getCountry().length() != 0; @@ -72,15 +81,6 @@ public class DefaultMarkupCacheKeyProvid buffer.append('_').append(locale.getVariant()); } } - if (container.getStyle() != null) - { - buffer.append('_').append(container.getStyle()); - } - - if (container.getVariation() != null) - { - buffer.append('_').append(container.getVariation()); - } buffer.append('.').append(container.getMarkupType().getExtension()); return buffer.toString();