Harmony
  1. Harmony
  2. HARMONY-6334

[classlib] [text] java.text.Format#parseObject(String) does not behave as expected

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0M11
    • Fix Version/s: 5.0M12
    • Component/s: Classlib
    • Labels:
      None

      Description

      java.text.Format#parseObject(String) does not behave as expected.

      AIUI, parseObject(String) is supposed to succeed even if the full string is not parsed successfully, i.e. so long as some part of the string has been parsed, an object should be returned.

      However the current implementation checks for errorIndex <> -1, which seems wrong
      The Javadoc for parseObject(String, ParsePosition) does not specify that errorIndex must be -1 for a successful parse, only that it must be set for a failed parse.

        Activity

        Sebb created issue -
        Tim Ellison made changes -
        Field Original Value New Value
        Assignee Tim Ellison [ tellison ]
        Tim Ellison made changes -
        Summary java.text.Format#parseObject(String) does not behave as expected [classlib] [text] java.text.Format#parseObject(String) does not behave as expected
        Hide
        Tim Ellison added a comment -

        I agree. Fix applied to TEXT module at repo revision r810948.

        Not marking as resolved yet as regression test cases to follow.

        Please verify this fixes the problem for you.

        Show
        Tim Ellison added a comment - I agree. Fix applied to TEXT module at repo revision r810948. Not marking as resolved yet as regression test cases to follow. Please verify this fixes the problem for you.
        Hide
        Tim Ellison added a comment -

        Regression test added at r811374.

        Show
        Tim Ellison added a comment - Regression test added at r811374.
        Tim Ellison made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 5.0M12 [ 12314191 ]
        Resolution Fixed [ 1 ]
        Hide
        Tim Ellison added a comment -

        Sebb verified this fix privately.

        Show
        Tim Ellison added a comment - Sebb verified this fix privately.
        Tim Ellison made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        23h 31m 1 Tim Ellison 04/Sep/09 13:53
        Resolved Resolved Closed Closed
        17s 1 Tim Ellison 04/Sep/09 13:53

          People

          • Assignee:
            Tim Ellison
            Reporter:
            Sebb
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development