Skip to content

why does VariableFieldPackager not get value form Map like FixedFieldPackager do in the pack method? #320

Description

@Zhangkc

VariableFieldPackager returns delimiter if value is null.
FixedFieldPackager would get value from map if value is null.

public byte[] pack(Map<String, String> fields) throws ISOException {
		if (value == null || value.equals("")) {
			return new byte[] { delimiter.byteValue() };
		}



public byte[] pack(Map<String, String> fields) throws ISOException {
		if (value== null) {
			value = fields.get(getName());
		}
		else {
			fields.put(getName(), value);
		}

this causes packing empty value when VariableFieldPackager in a nested FSDMsgX.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions