Skip to content

Commit

Permalink
fix(codegen/plc4j): fix cast exception relating BitInteger
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl committed Feb 26, 2022
1 parent 54ec98f commit 37eab1c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public T readVirtualField(String logicalName, Class<T> type, Object valueExpress
return type.cast(String.valueOf(valueExpression));
}
if (type == BigInteger.class) {
long longValue = valueExpression instanceof Long ? (Long) valueExpression : (long) valueExpression;
long longValue = valueExpression instanceof Long ? (Long) valueExpression : ((Number)valueExpression).longValue();
return (T) BigInteger.valueOf(longValue);
}
return type.cast(valueExpression);
Expand Down

0 comments on commit 37eab1c

Please sign in to comment.