[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2249) CharacterType bug when char is empty (length = 0)
David Larsson (JIRA)
noreply at atlassian.com
Fri Nov 17 05:35:04 EST 2006
CharacterType bug when char is empty (length = 0)
-------------------------------------------------
Key: HHH-2249
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2249
Project: Hibernate3
Type: Bug
Components: core
Reporter: David Larsson
The get method of CharacterType doesn't check for empty string.
Should be something like:
public Object get(ResultSet rs, String name) throws SQLException {
String str = rs.getString(name);
if (str==null || str.size() == 0l) { // CHANGED ROW to check for empty string
return null;
}
else {
return new Character( str.charAt(0) ); // Else, this will throw ArrayOutOfBoundsException when string is empty
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list