Description
The V3AnnotationPortletConfigTests_SPEC2_28_SupportedLocales_declaringSupportedLocales1 test relies on the the @PortletConfiguration annotation to define supported locales:
AnnotationPortletConfigTests_SPEC2_28_SupportedLocales.java
@PortletConfiguration( portletName = "AnnotationPortletConfigTests_SPEC2_28_SupportedLocales", supportedLocales = {"en_US", "de"} ) public class AnnotationPortletConfigTests_SPEC2_28_SupportedLocales implements Portlet { ... }
The test code looks like the following:
Enumeration<Locale> supportedLocales = portletConfig.getSupportedLocales(); List<Locale> supportedLocalesList = Collections.list(supportedLocales); if(supportedLocalesList.size()==2 && supportedLocalesList.get(0).toString().equals("en_us") && supportedLocalesList.get(1).toString().equals("de")){ result.setTcSuccess(true); }
The problem is that the TCK uses a String comparison for lower-case "en_us" which is relying on Pluto's incorrect implementation of portletConfig.getSupportedLocales(). For more information, see PLUTO-711.
Proposed fix to the test:
if(supportedLocalesList.size()==2 && supportedLocalesList.get(0).equals(Locale.US) && supportedLocalesList.get(1).equals(Locale.GERMAN)) { result.setTcSuccess(true); }