Simplify creation of return value
git-svn-id: https://j8583.svn.sourceforge.net/svnroot/j8583/j8583@104 db60a039-f72e-0410-b1d2-baa000846441
This commit is contained in:
@@ -62,13 +62,9 @@ public class LllvarParseInfo extends FieldParseInfo {
|
|||||||
if (custom == null) {
|
if (custom == null) {
|
||||||
return new IsoValue<String>(type, _v, length, null);
|
return new IsoValue<String>(type, _v, length, null);
|
||||||
} else {
|
} else {
|
||||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
Object decoded = custom.decodeField(_v);
|
||||||
IsoValue<?> v = new IsoValue(type, custom.decodeField(_v), length, custom);
|
//If decode fails, return string; otherwise use the decoded object and its codec
|
||||||
if (v.getValue() == null) {
|
return new IsoValue(type, decoded == null ? _v : decoded, length, decoded == null ? null : custom);
|
||||||
//problems decoding? return the string
|
|
||||||
return new IsoValue<String>(type, _v, length, null);
|
|
||||||
}
|
|
||||||
return v;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user