You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by "Neil Griffin (JIRA)" <ji...@apache.org> on 2018/05/08 16:58:00 UTC

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

     [ https://issues.apache.org/jira/browse/PLUTO-712?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Neil Griffin updated PLUTO-712:
-------------------------------
    Summary: TCK: Contesting V3AnnotationPortletConfigTests_SPEC2_28_SupportedLocales_declaringSupportedLocales1  (was: Contesting V3AnnotationPortletConfigTests_SPEC2_28_SupportedLocales_declaringSupportedLocales1)

> 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)