Derby
  1. Derby
  2. DERBY-5331

Incorrect use of CharsetEncoder in DDMWriter

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0, 10.5.3.0, 10.6.1.0, 10.6.2.1, 10.7.1.1, 10.8.1.2
    • Fix Version/s: 10.8.2.2, 10.9.1.0
    • Component/s: Network Server
    • Labels:
      None

      Description

      DDMWriter has two calls to CharsetEncoder.encode(), in writeLDString() and writeString(). According to the javadoc for CharsetEncoder, one should call reset() before one calls encode(), and flush() after on. DDMWriter doesn't call reset() or flush(). I'm not aware of any problems that happen because of it, but we should follow the spec to avoid surprises.

      1. reset-flush.diff
        1 kB
        Knut Anders Hatlen

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open In Progress In Progress
          12m 31s 1 Knut Anders Hatlen 14/Jul/11 09:18
          In Progress In Progress Resolved Resolved
          6d 18m 1 Knut Anders Hatlen 20/Jul/11 09:36
          Resolved Resolved Closed Closed
          370d 7h 49m 1 Knut Anders Hatlen 24/Jul/12 17:26
          Gavin made changes -
          Workflow jira [ 12620350 ] Default workflow, editable Closed status [ 12801151 ]
          Knut Anders Hatlen made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Myrna van Lunteren made changes -
          Fix Version/s 10.8.2.2 [ 12317968 ]
          Fix Version/s 10.8.2.0 [ 12317955 ]
          Myrna van Lunteren made changes -
          Fix Version/s 10.8.2.0 [ 12317955 ]
          Fix Version/s 10.8.1.6 [ 12316676 ]
          Knut Anders Hatlen made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Fix Version/s 10.8.1.6 [ 12316676 ]
          Resolution Fixed [ 1 ]
          Hide
          Knut Anders Hatlen added a comment -

          Merged fix to 10.8 and committed revision 1148668.

          Show
          Knut Anders Hatlen added a comment - Merged fix to 10.8 and committed revision 1148668.
          Knut Anders Hatlen made changes -
          Fix Version/s 10.9.0.0 [ 12316344 ]
          Issue & fix info [Patch Available]
          Hide
          Knut Anders Hatlen added a comment -

          Committed revision 1148658.

          Show
          Knut Anders Hatlen added a comment - Committed revision 1148658.
          Knut Anders Hatlen made changes -
          Issue & fix info [Patch Available]
          Hide
          Knut Anders Hatlen added a comment -

          All the regression tests passed.

          Show
          Knut Anders Hatlen added a comment - All the regression tests passed.
          Knut Anders Hatlen made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Knut Anders Hatlen made changes -
          Assignee Knut Anders Hatlen [ knutanders ]
          Knut Anders Hatlen made changes -
          Attachment reset-flush.diff [ 12486419 ]
          Hide
          Knut Anders Hatlen added a comment -

          Attached a patch that adds a call to reset() before encode(), and also a call to flush() if the encode() operation successfully encoded all characters in the input.

          Running regression tests now.

          Show
          Knut Anders Hatlen added a comment - Attached a patch that adds a call to reset() before encode(), and also a call to flush() if the encode() operation successfully encoded all characters in the input. Running regression tests now.
          Knut Anders Hatlen made changes -
          Field Original Value New Value
          Link This issue relates to DERBY-2936 [ DERBY-2936 ]
          Knut Anders Hatlen created issue -

            People

            • Assignee:
              Knut Anders Hatlen
              Reporter:
              Knut Anders Hatlen
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development