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
+1 -1
View File
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.solab</groupId>
<artifactId>j8583</artifactId>
<version>1.5.0</version>
<version>1.5.1</version>
<packaging>jar</packaging>
<name>j8583</name>
<description>Java implementation of the ISO 8583 protocol, focused on making the creation, edition and reading of ISO8583 messages as simple and flexible as possible.</description>
@@ -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;
}
-2
View File
@@ -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;