Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-6754

UnitUtilsTest cant manage a locale different from US

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.12.0
    • 2.12.1, 2.13.0
    • camel-core
    • Fedora release 18 (Spherical Cow) 64 bit, Italian locale

    • Patch Available
    • Novice

    Description

      When locale is set to a language different from english (for example italian), the unit test in org.apache.camel.util.UnitUtilsTest fail, because in the italian locale the decimal separator is the comma, not the dot.

      The test compare the results of printUnitFromBytes to static strings formatted with the dot, and in an italian locale fails because it espects "1.0" and get instead "1,0".

      I have patched the test code to make it works in every locale (building the expected results with the current locale decimal separator), and i have attached the patch to this issue.

      Attachments

        1. locale_patch.patch
          2 kB
          Alessandro Rontani

        Activity

          People

            njiang Willem Jiang
            steeltanuki Alessandro Rontani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: