Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-1935

Conversion of Bytes to/from String properties is not functioning correctly.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Java-SDO-1.0
    • Java-SDO-1.1
    • None
    • n/a

    Description

      According to the SDO for Java specification v. 2.1.0, conversion of string properties to byte arrays and from byte array properties to string is a supported conversion type. This is confirmed on page 138 of the spec. Additionally, sections 8.1.4 and 8.1.5 describe the behavior of such conversions. When an attempt is made to perform one of the following functions, though, a ClassCastException is thrown:

      dataObj.getBytes("stringPropName");
      dataObj.set("stringPropName", byteArrayValue);
      dataObj.set("byteArrayPropName", stringValue);

      The dataObj.getString("byteArrayPropName") method seems to be functioning correctly.

      Attachments

        1. 1935.patch
          1 kB
          David T. Adcox
        2. 1935WithTestAugmentation.patch
          19 kB
          David T. Adcox
        3. Test1935.java
          3 kB
          David T. Adcox

        Activity

          People

            Unassigned Unassigned
            dtadcox David T. Adcox
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: