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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.1.3.1
    • 10.1.3.1
    • Test
    • 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.derbyTesting.functionTests.tests.jdbcapi.blobclob4BLOB
      org.apache.derbyTesting.functionTests.tests.jdbcapi.resultset
      org.apache.derbyTesting.functionTests.tests.lang.coalesceTests
      org.apache.derbyTesting.functionTests.tests.store.streamingColumn

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

      Attachments

        1. DERBY-903_021306.diff
          16 kB
          Myrna van Lunteren
        2. DERBY-903_021306.stat
          0.4 kB
          Myrna van Lunteren
        3. DERBY-903_101_20060426.diff
          11 kB
          Myrna van Lunteren
        4. DERBY-903_101_20060426.stat
          0.2 kB
          Myrna van Lunteren
        5. DERBY-903_followup1_2006_02_16.diff
          2 kB
          Myrna van Lunteren
        6. DERBY-903_followup1_2006_02_16.stat
          0.2 kB
          Myrna van Lunteren

        Issue Links

          Activity

            People

              myrna Myrna van Lunteren
              djd Daniel John Debrunner
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: