Hi Team,
I have a field defined in BCD with right F pad using IFB_FLLNUM. Looks like when I pack stuff, it works fine.
But when I unpack stuff, it doesnt seem to care if the padding character is F or 0.
Here is an example:
@Test
public void testRightFPadWith0Padding() throws Exception {
// 0 padding instead of F pad
byte[] raw = ISOUtil.hex2byte("11000000000030");
// Specify it to be right padded
IFB_FLLNUM packager = new IFB_FLLNUM(11, "Should be 00000000003", false);
ISOField field = new ISOField(1);
packager.unpack(field, raw, 0);
// Doesnt seem to care the padding character
assertEquals("00000000003", (String) field.getValue());
}
The packager doesnt seem to care if the padding character is 0 or f. I tried with the left pad as well and it is the same.
Is this by design? If I need the framework to strictly follow the field definition and fail to unpack on this, is there a way to do it?
Cheers
Eric