Harmony
  1. Harmony
  2. HARMONY-170

java.nio.charset.CharsetEncoder.encode method does not handle the unexpected exception

    Details

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

      Description

      public final CoderResult encode(CharBuffer in, ByteBuffer out, boolean endOfInput)
      As spec says, the method throws CoderMalfunctionError if an invocation of the decodeLoop method threw an unexpected exception.

      However, Harmony doesn't throws CoderMalfunctionError when decodeLoop method threw an unexpected exception.

      The attached test cases pass on RI , but fail on Harmony.

      1. CharsetEncoderTest_patch.txt
        2 kB
        Richard Liang
      2. CharsetEncoder_patch.txt
        1 kB
        Richard Liang

        Activity

        Richard Liang created issue -
        Hide
        Richard Liang added a comment -

        Hello Tim,

        Please try my patch and the proposed test cases. Thanks a lot.

        Show
        Richard Liang added a comment - Hello Tim, Please try my patch and the proposed test cases. Thanks a lot.
        Richard Liang made changes -
        Field Original Value New Value
        Attachment CharsetEncoderTest_patch.txt [ 12323750 ]
        Attachment CharsetEncoder_patch.txt [ 12323749 ]
        Tim Ellison made changes -
        Assignee Tim Ellison [ tellison ]
        Tim Ellison made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Tim Ellison added a comment -

        Thanks Richard,

        That was as exemplary JIRA report – a patch for the code and test suite, and following the conventions! It made the task of checking and applying the patch very easy, thank you!

        Applied to NIO_CHAR module java.nio.charset.CharsetEncoder at repo revision 383871
        .
        Please check that the patch was applied as you expected.

        Show
        Tim Ellison added a comment - Thanks Richard, That was as exemplary JIRA report – a patch for the code and test suite, and following the conventions! It made the task of checking and applying the patch very easy, thank you! Applied to NIO_CHAR module java.nio.charset.CharsetEncoder at repo revision 383871 . Please check that the patch was applied as you expected.
        Tim Ellison made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Richard Liang added a comment -

        Hello Tim,

        The fix looks good. Thanks a lot.

        Show
        Richard Liang added a comment - Hello Tim, The fix looks good. Thanks a lot.
        Hide
        Tim Ellison added a comment -

        Verified by Richard

        Show
        Tim Ellison added a comment - Verified by Richard
        Tim Ellison made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        1d 7h 10m 1 Tim Ellison 07/Mar/06 20:56
        In Progress In Progress Resolved Resolved
        9m 6s 1 Tim Ellison 07/Mar/06 21:05
        Resolved Resolved Closed Closed
        6d 20h 33m 1 Tim Ellison 14/Mar/06 17:38

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development