OSDN Git Service

Resolved some SonarLint warnings
[spring-ext/ozacc-mail.git] / src / main / java / com / ozacc / mail / spring / MailetRunnerJob.java
index 7bced28..d474072 100644 (file)
@@ -21,7 +21,7 @@ import com.ozacc.mail.mailet.MailetWrapper;
  */
 public class MailetRunnerJob extends QuartzJobBean {
 
-       private List mailetWrapperList;
+       private List<MailetWrapper> mailetWrapperList;
 
        private FetchMailPro fetchMailPro;
 
@@ -29,7 +29,7 @@ public class MailetRunnerJob extends QuartzJobBean {
         * コンストラクタ。
         */
        public MailetRunnerJob() {
-               mailetWrapperList = new ArrayList();
+               mailetWrapperList = new ArrayList<>();
        }
 
        /**
@@ -58,8 +58,8 @@ public class MailetRunnerJob extends QuartzJobBean {
         * @param mail MailetUnitに渡す受信メール
         */
        private void processMail(ReceivedMail mail) {
-               for (Iterator itr = mailetWrapperList.iterator(); itr.hasNext();) {
-                       MailetWrapper mailetWrapper = (MailetWrapper)itr.next();
+               for (Iterator<MailetWrapper> itr = mailetWrapperList.iterator(); itr.hasNext();) {
+                       MailetWrapper mailetWrapper = itr.next();
                        mailetWrapper.execute(mail);
                }
        }
@@ -78,7 +78,7 @@ public class MailetRunnerJob extends QuartzJobBean {
         * 
         * @param mailetWrapperList 実行するMailetのMailetWrapperリスト
         */
-       public void setMailetWrapperList(List mailetWrapperList) {
+       public void setMailetWrapperList(List<MailetWrapper> mailetWrapperList) {
                this.mailetWrapperList = mailetWrapperList;
        }