Skip to content

Commit

Permalink
Support for type coercion for values passed as ids and as query param…
Browse files Browse the repository at this point in the history
…eter bindings

- fixed compilation errors when using JDK 8
  • Loading branch information
sebersole committed May 4, 2021
1 parent fa8571c commit c87a50c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit c87a50c

Please sign in to comment.