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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package j8583;
|
||||
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.text.ParseException;
|
||||
|
||||
import org.junit.Assert;
|
||||
|
||||
Reference in New Issue
Block a user