From f2677b8c967de455937f53435d46572d3a5117b3 Mon Sep 17 00:00:00 2001 From: chochos Date: Mon, 26 Sep 2011 20:49:29 +0000 Subject: [PATCH] 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 --- src/main/java/com/solab/iso8583/MessageFactory.java | 2 ++ .../com/solab/iso8583/parse/AlphaNumericFieldParseInfo.java | 2 +- src/main/java/com/solab/iso8583/parse/AlphaParseInfo.java | 2 +- src/main/java/com/solab/iso8583/parse/BinaryParseInfo.java | 4 ++-- src/main/java/com/solab/iso8583/parse/LlbinParseInfo.java | 4 ++-- src/main/java/com/solab/iso8583/parse/LllbinParseInfo.java | 4 ++-- src/main/java/com/solab/iso8583/parse/LllvarParseInfo.java | 4 ++-- src/main/java/com/solab/iso8583/parse/LlvarParseInfo.java | 4 ++-- 8 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/solab/iso8583/MessageFactory.java b/src/main/java/com/solab/iso8583/MessageFactory.java index 0dd496f..29b9dfa 100644 --- a/src/main/java/com/solab/iso8583/MessageFactory.java +++ b/src/main/java/com/solab/iso8583/MessageFactory.java @@ -64,6 +64,7 @@ public class MessageFactory { /** The ISO header to be included in each message type. */ private Map isoHeaders = new HashMap(); /** A map for the custom field encoder/decoders, keyed by field number. */ + @SuppressWarnings("rawtypes") private Map customFields = new HashMap(); /** 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 value) { customFields = value; } diff --git a/src/main/java/com/solab/iso8583/parse/AlphaNumericFieldParseInfo.java b/src/main/java/com/solab/iso8583/parse/AlphaNumericFieldParseInfo.java index c58d968..2073881 100644 --- a/src/main/java/com/solab/iso8583/parse/AlphaNumericFieldParseInfo.java +++ b/src/main/java/com/solab/iso8583/parse/AlphaNumericFieldParseInfo.java @@ -50,7 +50,7 @@ public abstract class AlphaNumericFieldParseInfo extends FieldParseInfo { if (custom == null) { return new IsoValue(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(type, _v, length, null); diff --git a/src/main/java/com/solab/iso8583/parse/AlphaParseInfo.java b/src/main/java/com/solab/iso8583/parse/AlphaParseInfo.java index 6f2d1c1..58b51b6 100644 --- a/src/main/java/com/solab/iso8583/parse/AlphaParseInfo.java +++ b/src/main/java/com/solab/iso8583/parse/AlphaParseInfo.java @@ -40,7 +40,7 @@ public class AlphaParseInfo extends AlphaNumericFieldParseInfo { if (custom == null) { return new IsoValue(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(type, new String(buf, pos, length, getCharacterEncoding()), length, null); diff --git a/src/main/java/com/solab/iso8583/parse/BinaryParseInfo.java b/src/main/java/com/solab/iso8583/parse/BinaryParseInfo.java index 06b60d3..f11a6e0 100644 --- a/src/main/java/com/solab/iso8583/parse/BinaryParseInfo.java +++ b/src/main/java/com/solab/iso8583/parse/BinaryParseInfo.java @@ -51,7 +51,7 @@ public class BinaryParseInfo extends FieldParseInfo { if (custom == null) { return new IsoValue(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(type, binval, binval.length, null); @@ -67,7 +67,7 @@ public class BinaryParseInfo extends FieldParseInfo { if (custom == null) { return new IsoValue(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(type, _v, length, null); diff --git a/src/main/java/com/solab/iso8583/parse/LlbinParseInfo.java b/src/main/java/com/solab/iso8583/parse/LlbinParseInfo.java index 0990e26..f212dda 100644 --- a/src/main/java/com/solab/iso8583/parse/LlbinParseInfo.java +++ b/src/main/java/com/solab/iso8583/parse/LlbinParseInfo.java @@ -52,7 +52,7 @@ public class LlbinParseInfo extends FieldParseInfo { if (custom == null) { return new IsoValue(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(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(type, _v, null); diff --git a/src/main/java/com/solab/iso8583/parse/LllbinParseInfo.java b/src/main/java/com/solab/iso8583/parse/LllbinParseInfo.java index 07a60d5..210b367 100644 --- a/src/main/java/com/solab/iso8583/parse/LllbinParseInfo.java +++ b/src/main/java/com/solab/iso8583/parse/LllbinParseInfo.java @@ -55,7 +55,7 @@ public class LllbinParseInfo extends FieldParseInfo { if (custom == null) { return new IsoValue(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(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(type, _v, null); diff --git a/src/main/java/com/solab/iso8583/parse/LllvarParseInfo.java b/src/main/java/com/solab/iso8583/parse/LllvarParseInfo.java index 45b3ccd..6c3ac72 100644 --- a/src/main/java/com/solab/iso8583/parse/LllvarParseInfo.java +++ b/src/main/java/com/solab/iso8583/parse/LllvarParseInfo.java @@ -62,7 +62,7 @@ public class LllvarParseInfo extends FieldParseInfo { if (custom == null) { return new IsoValue(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(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(type, new String(buf, pos + 2, length, getCharacterEncoding()), null); diff --git a/src/main/java/com/solab/iso8583/parse/LlvarParseInfo.java b/src/main/java/com/solab/iso8583/parse/LlvarParseInfo.java index 93d3b9d..435f6f6 100644 --- a/src/main/java/com/solab/iso8583/parse/LlvarParseInfo.java +++ b/src/main/java/com/solab/iso8583/parse/LlvarParseInfo.java @@ -57,7 +57,7 @@ public class LlvarParseInfo extends FieldParseInfo { if (custom == null) { return new IsoValue(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(type, _v, length, null); @@ -79,7 +79,7 @@ public class LlvarParseInfo extends FieldParseInfo { if (custom == null) { return new IsoValue(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(type, new String(buf, pos + 1, length, getCharacterEncoding()), null);