Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-1354

Writer.write(int c) to writer from Clob.setCharacterStream(long pos) appends integer value, not character

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.1.3.1
    • Component/s: JDBC, Network Client
    • Labels:
      None

      Description

      DERBY-1245-collateraldamage-v1.patch fixes a little bug in o.a.d.client.am.ClobWriter.java's write(int c) method.
      In it's original implementation the int parameter was passed directly to the StringBuffer.append() method, resulting
      in the int being converted to it's string representation and then appended. (i.e. passing the char 'a' to write(int c)
      would append the string "97" to the StringBuffer and thus the Clob. 97 is the ASCII code for the character 'a'.)

      Please note that the patch is attached to DERBY-1245, as that was the Jira issue I was working on when I discovered
      this. This issue is a placeholder of sorts. =)

        Attachments

        1. DERBY-1354.patch
          19 kB
          Anders Morken

          Issue Links

            Activity

              People

              • Assignee:
                andersmo Anders Morken
                Reporter:
                andersmo Anders Morken
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: