You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
StructArrayEncoder.string thorws null pointer for a null value, where as StructEncoder behaves normally and does a null check to avoid NPE. Should the runnel api allow null values for string, or the user should only encode the field if it's non-null.
The text was updated successfully, but these errors were encountered:
This is a good question: so far, runnel only allows primitive types (int, long, double...) in the encoding APIs, and non-primitives like String, Enm and ByteBuffer are null-checked.
We could change the API so that runnel would accept wrapper types (Integer, Long, Double) instead of primitives and perform the null checks internally. That would make the API a bit more fluent.
That needs to be pondered to make sure that wouldn't create ill effects, obviously.
@ChrisGreenaway it is; but when you think about it, it would make sense to avoid having to code null checks for all types, and not only strings. Don't you think?
StructArrayEncoder.string thorws null pointer for a null value, where as StructEncoder behaves normally and does a null check to avoid NPE. Should the runnel api allow null values for string, or the user should only encode the field if it's non-null.
The text was updated successfully, but these errors were encountered: