Won't Fix
Details
Assignee
Brett MeyerBrett MeyerReporter
Gustavo ViníciusGustavo ViníciusLabels
Original estimate
Time tracking
No time logged56h remainingComponents
Affects versions
Priority
Blocker
Details
Details
Assignee
Brett Meyer
Brett MeyerReporter
Gustavo Vinícius
Gustavo ViníciusLabels
Original estimate
Time tracking
No time logged56h remaining
Components
Affects versions
Priority
Created August 6, 2012 at 4:55 PM
Updated October 11, 2013 at 4:02 PM
Resolved October 11, 2013 at 2:16 PM
I'm working on an Database Synchronization tool and my problem is, when i have a char/varchar column type and it's field is empty on a select statement the method CharacterTypeDescriptor.wrap(X value, WrapperOptions options) throws a StringIndexOutOfBoundsException. By the way, looking at the implementation of method:
"...
if ( String.class.isInstance( value ) ) {
final String str = (String) value;
return Character.valueOf( str.charAt(0) );
..."
I can realize that the problem is on the "str.charAt(0)", my field(s) doesn't have any information, is empty and the system is a legacy system, I cannot modify that information. About the implementation of "wrap" it cannot be done this way:
"...
if ( String.class.isInstance( value ) ) {
final String str = (String) value;
if(str.length() == 0) {
return null
} else {
return Character.valueOf( str.charAt(0) );
}
..."
??
Any solution that I can do?