[jira] [Closed] (PLUTO-712) TCK: Contesting V3AnnotationPortletConfigTests_SPEC2_28_SupportedLocales_declaringSupportedLocales1

"Neil Griffin (JIRA)" <[email protected]>
Newsgroups gmane.comp.jakarta.pluto.devel
Message-ID <[email protected]>
     [ https://issues.apache.org/jira/browse/PLUTO-712?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Neil Griffin closed PLUTO-712.
------------------------------
    Resolution: Fixed

> TCK: Contesting V3AnnotationPortletConfigTests_SPEC2_28_SupportedLocales_declaringSupportedLocales1
> ---------------------------------------------------------------------------------------------------
>
>                 Key: PLUTO-712
>                 URL: https://issues.apache.org/jira/browse/PLUTO-712
>             Project: Pluto
>          Issue Type: Bug
>          Components: tck
>    Affects Versions: 3.0.0
>            Reporter: Neil Griffin
>            Assignee: Neil Griffin
>            Priority: Major
>             Fix For: 3.0.1
>
>
> The V3AnnotationPortletConfigTests_SPEC2_28_SupportedLocales_declaringSupportedLocales1 test relies on the the {{@PortletConfiguration}} annotation to define supported locales:
> {code:java|title=AnnotationPortletConfigTests_SPEC2_28_SupportedLocales.java}
> @PortletConfiguration(
>    portletName = "AnnotationPortletConfigTests_SPEC2_28_SupportedLocales",
>    supportedLocales = {"en_US", "de"}
> )
> public class AnnotationPortletConfigTests_SPEC2_28_SupportedLocales implements Portlet {
>     ...
> }
> {code}
> The test code looks like the following:
> {code:java}
> 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);
> }
> {code}
> 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:
> {code:java}
> if(supportedLocalesList.size()==2
>     && supportedLocalesList.get(0).equals(Locale.US)
>     && supportedLocalesList.get(1).equals(Locale.GERMAN)) {
>         result.setTcSuccess(true);
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.