-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
why does VariableFieldPackager not get value form Map like FixedFieldPackager do in the pack method? #320
Comments
Could you provide a simple reproducer code ? |
I don't know if this related to your issue or not but I it was missing a setValue("") which cause the hexdump method to err out with a null pointer exception. The idea is that when it eventually gets to a VariableFieldPackager the field can be set with string or null. If its an empty string or null the delimiter must be added to indicate the field is present with no data. VariableFieldPackager ad the setValue
Test
Output
If this is not your issue please provide a reproducer and I will try an look into it. |
thanks for reply, here is reproducer demo.
output
field var packed empty value |
I know I can set field value in branch FSDMsgX, but when nest more than 1 branch, it's hard to set value in branch FSDMsgX |
Thank you for the reproducer. Can you test it with this pack method
Test code
Output
Currently the fsdmsgx.hexdump does not work, it needs to be fixed, but its usage is for debugging , I will try and get to it later. ISOUtil.hexdump works fine and can be used. |
thanks a lot! I have tested and it seems ok! |
VariableFieldPackager returns delimiter if value is null.
FixedFieldPackager would get value from map if value is null.
this causes packing empty value when VariableFieldPackager in a nested FSDMsgX.
The text was updated successfully, but these errors were encountered: