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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Labels:
      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

            • Assignee:
              Unassigned
              Reporter:
              sebb Sebb
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: