Source:
<code>public static Object deserializeSQLTypesToJava(String sqltypename, String value ) throws ParseException { Class clazz = String.class; String cleantypename = sqltypename.trim().toUpperCase(); if (mapSQLtypeNameToJavaClass.containsKey(cleantypename)) clazz = mapSQLtypeNameToJavaClass.get(cleantypename); if( Boolean.TYPE == clazz ) return Boolean.parseBoolean( value ); else if (Byte[].class == clazz) return value.getBytes(Charset.forName("UTF-8")); else if( Byte.TYPE == clazz ) return Byte.parseByte( value ); else if( Integer.TYPE == clazz ) return Integer.parseInt( value ); else if( Long.TYPE == clazz ) return Long.parseLong( value ); else if( Float.TYPE == clazz ) return Float.parseFloat( value ); else if( Double.TYPE == clazz ) return Double.parseDouble( value ); else if ( Short.TYPE == clazz) return Short.parseShort(value); else if (Character.TYPE == clazz) return value.charAt(0); else if (java.math.BigDecimal.class == clazz) return new BigDecimal(value.replaceAll(",", "")); else if (java.sql.Date.class == clazz) return java.sql.Date.valueOf(value); else if (java.sql.Time.class == clazz) try { <START> return new java.sql.Time(((java.util.Date)HoursColonMinutesColonSeconds24HourFormat.parse(value)).getTime()); <END> } catch (ParseException e) { throw new ParseException("Could not deserialize " + value +" to time (HH:mm:ss) format: " + e.getLocalizedMessage(), e.getErrorOffset()); } else if (java.sql.Timestamp.class == clazz) return Timestamp.valueOf(value); else return value; }</code><technical_language>if exception is thrown in constructor getTime() method? object type returned is guaranteed behavior</technical_language>

Target:
public static Object deserializeSQLTypesToJava(String sqltypename, String value ) throws ParseException { Class clazz = String.class; String cleantypename = sqltypename.trim().toUpperCase(); if (mapSQLtypeNameToJavaClass.containsKey(cleantypename)) clazz = mapSQLtypeNameToJavaClass.get(cleantypename); if( Boolean.TYPE == clazz ) return Boolean.parseBoolean( value ); else if (Byte[].class == clazz) return value.getBytes(Charset.forName("UTF-8")); else if( Byte.TYPE == clazz ) return Byte.parseByte( value ); else if( Integer.TYPE == clazz ) return Integer.parseInt( value ); else if( Long.TYPE == clazz ) return Long.parseLong( value ); else if( Float.TYPE == clazz ) return Float.parseFloat( value ); else if( Double.TYPE == clazz ) return Double.parseDouble( value ); else if ( Short.TYPE == clazz) return Short.parseShort(value); else if (Character.TYPE == clazz) return value.charAt(0); else if (java.math.BigDecimal.class == clazz) return new BigDecimal(value.replaceAll(",", "")); else if (java.sql.Date.class == clazz) return java.sql.Date.valueOf(value); else if (java.sql.Time.class == clazz) try { return new java.sql.Time(((java.util.Date)HoursColonMinutesColonSeconds24HourFormat.parse(value)).getTime()); } catch (ParseException e) { throw new ParseException("Could not deserialize " + value +" to time (HH:mm:ss) format: " + e.getLocalizedMessage(), e.getErrorOffset()); } catch (Exception e) { throw new ParseException("Could not deserialize " + value +" to time (HH:mm:ss) format: " + e.getLocalizedMessage(),-1); } else if (java.sql.Timestamp.class == clazz) return Timestamp.valueOf(value); else return value; }