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

Remove use of String(byte[]) and String(byte[], int, int) constructors in network client leading to non-portable behaviour

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6
    • 10.1.3.1, 10.2.1.6
    • Network Client
    • None
    • Patch Available

    Description

      These constructors use the Java default platform encoding to convert the bytes to a String, this typically leads to bugs on platforms with different encodings.

      Replace with code using fixed conversion, or alternative mechanisms.
      If the call is required its use should be commented as to why it is required.

      org.apache.derby.client.am.ClobOutputStream - some existing bug?
      org.apache.derby.client.am.DateTime - see DERBY-877
      org.apache.derby.client.am.sqlca

      I generated this list using the Java search in eclipse for references to the constructors
      String(byte[])
      String(byte[],int,int)

      Attachments

        1. derby900_p2_cleanup.diff.txt
          8 kB
          Sunitha Kambhampati
        2. derby900_p2_cleanup.stat.txt
          0.2 kB
          Sunitha Kambhampati
        3. derby900.diff.p1.txt
          2 kB
          Sunitha Kambhampati
        4. derby900.p2_encodingChange.diff.txt
          4 kB
          Sunitha Kambhampati
        5. Derby900.p2.diff.txt
          8 kB
          Sunitha Kambhampati
        6. derby900.p2.stat.txt
          0.2 kB
          Sunitha Kambhampati
        7. derby900.stat.p1.txt
          0.2 kB
          Sunitha Kambhampati
        8. derby900.test.diff.txt
          4 kB
          Sunitha Kambhampati
        9. derby900.test.stat.txt
          0.2 kB
          Sunitha Kambhampati
        10. for_10.1_derby900.diff.p1.txt
          1 kB
          Sunitha Kambhampati
        11. for_10.1_derby900.stat.p1.txt
          0.1 kB
          Sunitha Kambhampati
        12. TestEnc.java
          7 kB
          Sunitha Kambhampati
        13. testsecmec.zip
          64 kB
          Katherine Marsden

        Activity

          People

            Unassigned Unassigned
            djd Daniel John Debrunner
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: