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) );
}
|