Uploaded image for project: 'Pluto'
  1. Pluto
  2. PLUTO-712

TCK: Contesting V3AnnotationPortletConfigTests_SPEC2_28_SupportedLocales_declaringSupportedLocales1

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.1
    • tck
    • None

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

      Attachments

        Activity

          People

            ngriffin7a Neil Griffin (Inactive)
            ngriffin7a Neil Griffin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: