Support for type coercion for values passed as ids and as query parameter bindings

- fixed compilation errors when using JDK 8
This commit is contained in:
Steve Ebersole 2021-05-04 09:15:19 -05:00
parent fa8571c706
commit c87a50ca0f
3 changed files with 7 additions and 7 deletions

View File

@ -121,19 +121,19 @@ public <X> BigInteger coerce(X value, CoercionContext coercionContext) {
}
if ( value instanceof Byte ) {
return BigInteger.valueOf( ( (byte) value ) );
return BigInteger.valueOf( ( (Byte) value ) );
}
if ( value instanceof Short ) {
return BigInteger.valueOf( ( (short) value ) );
return BigInteger.valueOf( ( (Short) value ) );
}
if ( value instanceof Integer ) {
return BigInteger.valueOf( ( (int) value ) );
return BigInteger.valueOf( ( (Integer) value ) );
}
if ( value instanceof Long ) {
return BigInteger.valueOf( ( (long) value ) );
return BigInteger.valueOf( ( (Long) value ) );
}
if ( value instanceof Double ) {

View File

@ -114,11 +114,11 @@ public <X> Byte coerce(X value, CoercionContext coercionContext) {
}
if ( value instanceof Byte ) {
return (byte) value;
return (Byte) value;
}
if ( value instanceof Short ) {
return CoercionHelper.toByte( (short) value );
return CoercionHelper.toByte( (Short) value );
}
if ( value instanceof Integer ) {

View File

@ -149,7 +149,7 @@ public <X> Double coerce(X value, CoercionContext coercionContext) {
}
if ( value instanceof Float ) {
return CoercionHelper.toDouble( (float) value );
return CoercionHelper.toDouble( (Float) value );
}
if ( value instanceof BigInteger ) {