Added @SuppressWarnings(rawtypes) where I was previously using only unchecked

git-svn-id: https://j8583.svn.sourceforge.net/svnroot/j8583/j8583@98 db60a039-f72e-0410-b1d2-baa000846441
This commit is contained in:
chochos
2011-09-26 20:49:29 +00:00
parent 56445e8f33
commit f2677b8c96
8 changed files with 14 additions and 12 deletions
@@ -64,6 +64,7 @@ public class MessageFactory {
/** The ISO header to be included in each message type. */
private Map<Integer, String> isoHeaders = new HashMap<Integer, String>();
/** A map for the custom field encoder/decoders, keyed by field number. */
@SuppressWarnings("rawtypes")
private Map<Integer, CustomField> customFields = new HashMap<Integer, CustomField>();
/** Indicates if the current date should be set on new messages (field 7). */
private boolean setDate;
@@ -116,6 +117,7 @@ public class MessageFactory {
}
/** Specifies a map for custom field encoder/decoders. The keys are the field numbers. */
@SuppressWarnings("rawtypes")
public void setCustomFields(Map<Integer, CustomField> value) {
customFields = value;
}
@@ -50,7 +50,7 @@ public abstract class AlphaNumericFieldParseInfo extends FieldParseInfo {
if (custom == null) {
return new IsoValue<String>(type, _v, length, null);
} else {
@SuppressWarnings("unchecked")
@SuppressWarnings({"unchecked", "rawtypes"})
IsoValue<?> v = new IsoValue(type, custom.decodeField(_v), length, custom);
if (v.getValue() == null) {
return new IsoValue<String>(type, _v, length, null);
@@ -40,7 +40,7 @@ public class AlphaParseInfo extends AlphaNumericFieldParseInfo {
if (custom == null) {
return new IsoValue<String>(type, new String(buf, pos, length, getCharacterEncoding()), length, null);
} else {
@SuppressWarnings("unchecked")
@SuppressWarnings({"unchecked", "rawtypes"})
IsoValue<?> v = new IsoValue(type, custom.decodeField(new String(buf, pos, length, getCharacterEncoding())), length, custom);
if (v.getValue() == null) {
return new IsoValue<String>(type, new String(buf, pos, length, getCharacterEncoding()), length, null);
@@ -51,7 +51,7 @@ public class BinaryParseInfo extends FieldParseInfo {
if (custom == null) {
return new IsoValue<byte[]>(type, binval, binval.length, null);
} else {
@SuppressWarnings("unchecked")
@SuppressWarnings({"unchecked", "rawtypes"})
IsoValue<?> v = new IsoValue(type, custom.decodeField(new String(buf, pos, length*2, getCharacterEncoding())), length, custom);
if (v.getValue() == null) {
return new IsoValue<byte[]>(type, binval, binval.length, null);
@@ -67,7 +67,7 @@ public class BinaryParseInfo extends FieldParseInfo {
if (custom == null) {
return new IsoValue<byte[]>(type, _v, length, null);
} else {
@SuppressWarnings("unchecked")
@SuppressWarnings({"unchecked", "rawtypes"})
IsoValue<?> v = new IsoValue(type, custom.decodeField(HexCodec.hexEncode(_v)), length, custom);
if (v.getValue() == null) {
return new IsoValue<byte[]>(type, _v, length, null);
@@ -52,7 +52,7 @@ public class LlbinParseInfo extends FieldParseInfo {
if (custom == null) {
return new IsoValue<byte[]>(type, binval, binval.length, null);
} else {
@SuppressWarnings("unchecked")
@SuppressWarnings({"unchecked", "rawtypes"})
IsoValue<?> v = new IsoValue(type, custom.decodeField(
new String(buf, pos + 2, length)), binval.length, custom);
if (v.getValue() == null) {
@@ -76,7 +76,7 @@ public class LlbinParseInfo extends FieldParseInfo {
if (custom == null) {
return new IsoValue<byte[]>(type, _v, null);
} else {
@SuppressWarnings("unchecked")
@SuppressWarnings({"unchecked", "rawtypes"})
IsoValue<?> v = new IsoValue(type, custom.decodeField(HexCodec.hexEncode(_v)), custom);
if (v.getValue() == null) {
return new IsoValue<byte[]>(type, _v, null);
@@ -55,7 +55,7 @@ public class LllbinParseInfo extends FieldParseInfo {
if (custom == null) {
return new IsoValue<byte[]>(type, binval, binval.length, null);
} else {
@SuppressWarnings("unchecked")
@SuppressWarnings({"unchecked", "rawtypes"})
IsoValue<?> v = new IsoValue(type, custom.decodeField(
length == 0 ? "" : new String(buf, pos + 3, length)), length, custom);
if (v.getValue() == null) {
@@ -80,7 +80,7 @@ public class LllbinParseInfo extends FieldParseInfo {
if (custom == null) {
return new IsoValue<byte[]>(type, _v, null);
} else {
@SuppressWarnings("unchecked")
@SuppressWarnings({"unchecked", "rawtypes"})
IsoValue<?> v = new IsoValue(type, custom.decodeField(HexCodec.hexEncode(_v)), custom);
if (v.getValue() == null) {
return new IsoValue<byte[]>(type, _v, null);
@@ -62,7 +62,7 @@ public class LllvarParseInfo extends FieldParseInfo {
if (custom == null) {
return new IsoValue<String>(type, _v, length, null);
} else {
@SuppressWarnings("unchecked")
@SuppressWarnings({"unchecked", "rawtypes"})
IsoValue<?> v = new IsoValue(type, custom.decodeField(_v), length, custom);
if (v.getValue() == null) {
//problems decoding? return the string
@@ -84,7 +84,7 @@ public class LllvarParseInfo extends FieldParseInfo {
if (custom == null) {
return new IsoValue<String>(type, new String(buf, pos + 2, length, getCharacterEncoding()), null);
} else {
@SuppressWarnings("unchecked")
@SuppressWarnings({"unchecked", "rawtypes"})
IsoValue<?> v = new IsoValue(type, custom.decodeField(new String(buf, pos + 2, length, getCharacterEncoding())), custom);
if (v.getValue() == null) {
return new IsoValue<String>(type, new String(buf, pos + 2, length, getCharacterEncoding()), null);
@@ -57,7 +57,7 @@ public class LlvarParseInfo extends FieldParseInfo {
if (custom == null) {
return new IsoValue<String>(type, _v, length, null);
} else {
@SuppressWarnings("unchecked")
@SuppressWarnings({"unchecked", "rawtypes"})
IsoValue<?> v = new IsoValue(type, custom.decodeField(_v), length, custom);
if (v.getValue() == null) {
return new IsoValue<String>(type, _v, length, null);
@@ -79,7 +79,7 @@ public class LlvarParseInfo extends FieldParseInfo {
if (custom == null) {
return new IsoValue<String>(type, new String(buf, pos + 1, length, getCharacterEncoding()), null);
} else {
@SuppressWarnings("unchecked")
@SuppressWarnings({"unchecked", "rawtypes"})
IsoValue<?> v = new IsoValue(type, custom.decodeField(new String(buf, pos + 1, length, getCharacterEncoding())), custom);
if (v.getValue() == null) {
return new IsoValue<String>(type, new String(buf, pos + 1, length, getCharacterEncoding()), null);