[ 
https://issues.apache.org/jira/browse/TUSCANY-1935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David T. Adcox updated TUSCANY-1935:
------------------------------------

    Attachment: 1935WithTestAugmentation.patch

As was discussed earlier on the dev list, there were some holes in testing 
setXXXX() type conversions.  I have augmented the TypeConversionTestCase to 
include testing of the setXXXXX() methods along with the existing getXXXX() 
testing.  Additionally, changes were made to test the String to/from Bytes 
testing which was needed for the changes introduced by this JIRA.  I am 
uploading this patch to cover the new test work and it also includes the 
changes to DataObjectUtil from the orginal 1935.patch file.

> Conversion of Bytes to/from String properties is not functioning correctly.
> ---------------------------------------------------------------------------
>
>                 Key: TUSCANY-1935
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1935
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Implementation
>    Affects Versions: Java-SDO-1.0
>         Environment: n/a
>            Reporter: David T. Adcox
>             Fix For: Java-SDO-Next
>
>         Attachments: 1935.patch, 1935WithTestAugmentation.patch, Test1935.java
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to