Uploaded image for project: 'Crowd Data Center'
  1. Crowd Data Center
  2. CWD-2103

Case-insensitive String comparison is not tied to a locale

    XMLWordPrintable

Details

    Description

      Crowd performs case-insensitive comparisons of user/group name by:
      1) String.toLowerCase and comparing the lowercase values
      2) String.compareToIgnoreCase

      This is inconsistent and produces an ordering/equality based on the system locale.

      We should to using a single form of normalising user/group names for case-insensitive comparison, for a specific locale:

      String.toLowerCase(FIXED_LOCALE)
      

      This method should be available on a util class. The FIXED_LOCALE should default to Locale.ENGLISH.

      This affects equals, hashcode, compareTo and comparators for domain objects with case-insensitive/case-preserving name schemes.

      If Crowd 2.1 users are on a system locale that's not compatible with Locale.ENGLISH, then:
      1) They would be able to export their data to XML and re-import it, so the normalisation process happens in Locale.ENGLISH for Crowd 2.2
      2) We could allow them to specify an override for the FIXED_LOCALE via a system property

      Attachments

        Issue Links

          Activity

            People

              psongsiritat Piyawoot Songsiritat [Atlassian]
              shamid@atlassian.com shihab
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 16h
                  16h
                  Remaining:
                  Time Spent - 8h Remaining Estimate - 8h
                  8h
                  Logged:
                  Time Spent - 8h Remaining Estimate - 8h
                  8h