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

Remove use of String(byte[]) constructors in network server leading to non-portable behaviour

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 10.1.3.1, 10.2.1.6
    • Network Server
    • None

    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.impl.drda.DRDAConnThread

      I generated this list using the Java search in eclipse for references to the constructors
      String(byte[])
      String(byte[],int,int) - no occurences found in java/drda

      Attachments

        1. for_10.1_derby901.p2.diff.txt
          5 kB
          Sunitha Kambhampati
        2. for_10.1_derby901.p2.stat.txt
          0.1 kB
          Sunitha Kambhampati
        3. derby901.p2.diff.txt
          5 kB
          Sunitha Kambhampati
        4. derby901.p2.stat.txt
          0.1 kB
          Sunitha Kambhampati
        5. for_10.1_derby901.p1.diff.txt
          4 kB
          Sunitha Kambhampati
        6. for_10.1_derby901.p1.stat.txt
          0.1 kB
          Sunitha Kambhampati
        7. Derby901.p1.diff.txt
          3 kB
          Sunitha Kambhampati
        8. Derby901.p1.stat.txt
          0.1 kB
          Sunitha Kambhampati
        9. TestEnc.java
          7 kB
          Sunitha Kambhampati

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: