Martin created Bug HHH-7548
Issue Type: Bug Bug
Affects Versions: 4.1.2
Assignee: Unassigned
Attachments: bug_report.zip
Components: core, entity-manager
Created: 24/Aug/12 6:17 AM
Description:

I have created an entity with a char property (private char = ' '). Loading this entity causes a StringIndexOutOfBoundsException because of the following implementation of org.hibernate.type.descriptor.java.CharacterTypeDescriptor#wrap:

// value is an empty string ("") so that charAt throws
// a StringIndexOutOfBoundsException
if ( String.class.isInstance( value ) ) { final String str = (String) value; return Character.valueOf( str.charAt(0) ); }

Environment: Hibernate: 4.1.2
Database: H2 - Version 1.3
Project: Hibernate ORM
Labels: hibernate core jpa2
Priority: Minor Minor
Reporter: Martin
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira