Uploaded image for project: 'XBean'
  1. XBean
  2. XBEAN-91

o.a.x.p.DateEditor.toObjectImpl throws exception when date format is in different locale than the default one

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1
    • 3.2
    • reflect
    • None

    Description

      There's the expanded-env-entries sample that uses a date in Locale.US format with DateFormat.MEDIUM style. It didn't run well on Polish locale (pl) and XBean's org.apache.xbean.propertyeditor.DateEditorTest.testToObjectImpl kept throwing "java.text.ParseException: Unparseable date: "Mar 1, 1954"" exception.

      Attached is a patch for it. I'm not happy with it (I think it might've been written better), so I haven't applied it to the repo, but rather attach it here for others to look at it and correct where applicable.

      p.s. The "Unreleased Versions" contains 3.1 which should be 3.2, I guess.

      Attachments

        1. XBEAN-91.patch
          10 kB
          Jacek Laskowski

        Activity

          People

            jlaskowski Jacek Laskowski
            jlaskowski Jacek Laskowski
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: