atom feed7 messages in net.java.dev.jsr235.issues[Issue 8] Char x0000 as String?
FromSent OnAttachments
kgoodsonFeb 7, 2008 2:46 am 
kgoodsonFeb 7, 2008 2:47 am 
kgoodsonMar 16, 2008 11:24 pm 
kgoodsonMar 20, 2008 10:37 am 
radupMay 16, 2008 2:46 pm 
sbuennigMay 20, 2008 6:32 am 
radupMay 28, 2008 3:40 pm 
Subject:[Issue 8] Char x0000 as String?
From:radup (rad@dev.java.net)
Date:May 16, 2008 2:46:08 pm
List:net.java.dev.jsr235.issues

https://jsr235.dev.java.net/issues/show_bug.cgi?id=8

------- Additional comments from rad@dev.java.net Fri May 16 21:46:24 +0000
2008 ------- This was discussed on the May-15 call.

One potential use-case was brought up: that of a user blindly (without checking isSet() that is) setting character values obtained by calling get() on a property of type Character to some other property. That could lead to SDO being unable to save the target DataObject to XML because of the '\u0000' character.

Tentative resolution: 8.1.6 Conversion between Character and String The conversion from Character to String happens when calling getString() on a property of type Character or setCharacter() on a property of type String; the conversion from String to Character happens when calling getCharacter() on a property of type String or setString() on a property of type Character. A Character value maps to a String of length 1, whose first (and only) character is that Character value. The character with the Unicode codepoint '0' maps to the empty String. Strings with length > 1 can't be converted to Character. null String can't be converted to Character.