Make List type safe. Remove/suppress all warnings.
[marc4j.git] / src / org / marc4j / ErrorHandler.java
index 63e5bc8..e201608 100644 (file)
@@ -74,7 +74,7 @@ public class ErrorHandler {
         */ \r
     public final static int INFO = 0;\r
     \r
-    private List errors;\r
+    private List<Error> errors;\r
     private String curRecordID;\r
     private String curField;\r
     private String curSubfield;\r
@@ -171,7 +171,7 @@ public class ErrorHandler {
      *  \r
      * @return List - A list of all of the errors encountered for the current record.\r
      */\r
-    public List getErrors()\r
+    public List<Error> getErrors()\r
     {\r
         if (errors == null || errors.size() == 0) return null;        \r
         return(errors);\r
@@ -202,7 +202,7 @@ public class ErrorHandler {
     {\r
         if (errors == null) \r
         {\r
-            errors = new LinkedList();\r
+            errors = new LinkedList<Error>();\r
             hasMissingID = false;\r
         }\r
         if (id != null && id.equals("unknown"))  hasMissingID = true;\r
@@ -231,7 +231,7 @@ public class ErrorHandler {
     {\r
         if (id != null)\r
         { \r
-            Iterator iter = errors.iterator();       \r
+            Iterator<Error> iter = errors.iterator();       \r
             while (iter.hasNext())\r
             {\r
                 Error err = (Error)(iter.next());\r