IDEMPIERE-3106:RequestEmailProcessor does not set values during CheckInputParameter

This commit is contained in:
hieplq 2016-05-18 01:42:03 +07:00
parent d8278975ed
commit 52da25249b
1 changed files with 6 additions and 1 deletions

View File

@ -143,6 +143,8 @@ public class RequestEMailProcessor extends SvrProcess implements ProcessEmailHan
*/ */
protected String doIt() throws Exception protected String doIt() throws Exception
{ {
parseParameter();
EmailSrv emailSrv = new EmailSrv(p_IMAPHost, p_IMAPUser, p_IMAPPwd, p_IMAPPort); EmailSrv emailSrv = new EmailSrv(p_IMAPHost, p_IMAPUser, p_IMAPPwd, p_IMAPPort);
checkInputParameter (emailSrv); checkInputParameter (emailSrv);
@ -155,7 +157,7 @@ public class RequestEMailProcessor extends SvrProcess implements ProcessEmailHan
return msgreturn.toString(); return msgreturn.toString();
} // doIt } // doIt
protected void checkInputParameter (EmailSrv emailSrv) throws MessagingException, Exception { protected void parseParameter() {
// === check input parameter === // === check input parameter ===
int portStartIndex = p_IMAPHost.lastIndexOf(":"); int portStartIndex = p_IMAPHost.lastIndexOf(":");
if (portStartIndex > 0){ if (portStartIndex > 0){
@ -169,6 +171,9 @@ public class RequestEMailProcessor extends SvrProcess implements ProcessEmailHan
}else if (p_IMAPHost.startsWith("imap.gmail.com")){ }else if (p_IMAPHost.startsWith("imap.gmail.com")){
p_IMAPPort = 993; p_IMAPPort = 993;
} }
}
protected void checkInputParameter (EmailSrv emailSrv) throws MessagingException, Exception {
if (log.isLoggable(Level.INFO)) log.info("doIt - IMAPHost=" + p_IMAPHost + if (log.isLoggable(Level.INFO)) log.info("doIt - IMAPHost=" + p_IMAPHost +
" IMAPPort=" + p_IMAPPort + " IMAPPort=" + p_IMAPPort +
" IMAPUser=" + p_IMAPUser + " IMAPUser=" + p_IMAPUser +