0

In my packager xml file I have a subfield packager for a field.

The spec defines multiple field for this (say 25 of them) but I only care about the first one. So I really dont want to define more than that one field in my packager.

The problem arises when the request comes in with more than the one field (thats pretty normal).

The GenericSubFieldPackager basically determines the max number of field from the bitmap size and loops through and throws an exception as it sees bit for field 15 is set but the isofield 15 is not defined in the packager and throws an exception.

Could we modify the GenericSubFieldPackager code

Change

if (fld[i] != null) {

to

if (i < fld.length && fld[i] != null) {

to prevent the Array out of bounds exception as fld[15] does not exist as its not defined in my packager xml.

chhil
  • 442
  • 4
  • 12

1 Answers1

0

This suggested fix (already merged in jPOS 1.9.5) would just work for the last part of the message and if you're using a non-stream channel (i.e. it doesn't work with PADChannel, that reads the message on-the-fly).

If you care about some fields, for instance 2,3,4, and you don't care about fields 5,6,7, but then you care for field 8 and 9, this fix of course won't work, if either 8 and/or 9 happen to be present in the bitmap.

apr
  • 1,288
  • 7
  • 8