Validate that there is indeed a field to set the encoding to, in the IsoMessage. Update version to 1.5.1

git-svn-id: https://j8583.svn.sourceforge.net/svnroot/j8583/j8583@72 db60a039-f72e-0410-b1d2-baa000846441
This commit is contained in:
chochos
2011-04-08 16:21:58 +00:00
parent 77cec55ccf
commit a8c2aecd3e
3 changed files with 4 additions and 4 deletions
@@ -127,7 +127,9 @@ public class IsoMessage {
if (index < 2 || index > 128) {
throw new IndexOutOfBoundsException("Field index must be between 2 and 128");
}
field.setCharacterEncoding(encoding);
if (field != null) {
field.setCharacterEncoding(encoding);
}
fields[index] = field;
}