Added future tolerance to Date10 and Date4 parsers; simplified the use of generics in all the FieldParseInfo subclasses. Added a test for the future tolerance of date parsers.
git-svn-id: https://j8583.svn.sourceforge.net/svnroot/j8583/j8583@85 db60a039-f72e-0410-b1d2-baa000846441
This commit is contained in:
@@ -38,8 +38,7 @@ public class TimeParseInfo extends FieldParseInfo {
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> IsoValue<?> parse(byte[] buf, int pos, CustomField<T> custom)
|
||||
throws ParseException {
|
||||
public IsoValue<Date> parse(byte[] buf, int pos, CustomField<?> custom) throws ParseException {
|
||||
if (pos < 0) {
|
||||
throw new ParseException(String.format("Invalid position %d", pos), pos);
|
||||
}
|
||||
@@ -54,7 +53,7 @@ public class TimeParseInfo extends FieldParseInfo {
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> IsoValue<?> parseBinary(byte[] buf, int pos, CustomField<T> custom) throws ParseException {
|
||||
public IsoValue<Date> parseBinary(byte[] buf, int pos, CustomField<?> custom) throws ParseException {
|
||||
int[] tens = new int[3];
|
||||
int start = 0;
|
||||
for (int i = pos; i < pos + tens.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user