Uploaded image for project: 'Commons FileUpload'
  1. Commons FileUpload
  2. FILEUPLOAD-229

toLowerCase() is Locale-dependent; should use toLowerCase(Locale.ENGLISH) instead

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.3
    • None

    Description

      toLowerCase() is Locale-dependent - as is toUpperCase().

      For comparisons, can often use equalsIgnoreCase(String) instead.

      If an actual lower/upper case is required, then should use a fixed locale (unless the code is intended to use the default locale, which is quite unusual for Commons)

      A suitable locale is Locale.ENGLISH as that behaves well with ASCII and ISO-8859-1.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: