This is an automated email from the ASF dual-hosted git repository.

zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere-elasticjob.git


The following commit(s) were added to refs/heads/master by this push:
     new 4c8430c  Fix then EmailJobErrorHandler init method (#1642)
4c8430c is described below

commit 4c8430cb4f3d5fab14d90046c0336e4cb38d3bf0
Author: Yanjie Zhou <[email protected]>
AuthorDate: Fri Oct 23 14:37:44 2020 +0800

    Fix then EmailJobErrorHandler init method (#1642)
---
 .../elasticjob/error/handler/email/EmailJobErrorHandler.java          | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/elasticjob-error-handler/elasticjob-error-handler-type/elasticjob-error-handler-email/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/email/EmailJobErrorHandler.java
 
b/elasticjob-error-handler/elasticjob-error-handler-type/elasticjob-error-handler-email/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/email/EmailJobErrorHandler.java
index 02e3a11..5b7a715 100644
--- 
a/elasticjob-error-handler/elasticjob-error-handler-type/elasticjob-error-handler-email/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/email/EmailJobErrorHandler.java
+++ 
b/elasticjob-error-handler/elasticjob-error-handler-type/elasticjob-error-handler-email/src/main/java/org/apache/shardingsphere/elasticjob/error/handler/email/EmailJobErrorHandler.java
@@ -61,8 +61,8 @@ public final class EmailJobErrorHandler implements 
JobErrorHandler {
     public void init(final Properties props) {
         String host = props.getProperty(EmailPropertiesConstants.HOST);
         int port = 
Integer.parseInt(props.getProperty(EmailPropertiesConstants.PORT));
-        boolean isUseSSL = 
Boolean.getBoolean(props.getProperty(EmailPropertiesConstants.IS_USE_SSL, 
EmailPropertiesConstants.DEFAULT_IS_USE_SSL));
-        boolean isDebug = 
Boolean.getBoolean(props.getProperty(EmailPropertiesConstants.IS_DEBUG, 
EmailPropertiesConstants.DEFAULT_IS_DEBUG));
+        boolean isUseSSL = 
Boolean.parseBoolean(props.getProperty(EmailPropertiesConstants.IS_USE_SSL, 
EmailPropertiesConstants.DEFAULT_IS_USE_SSL));
+        boolean isDebug = 
Boolean.parseBoolean(props.getProperty(EmailPropertiesConstants.IS_DEBUG, 
EmailPropertiesConstants.DEFAULT_IS_DEBUG));
         String username = props.getProperty(EmailPropertiesConstants.USERNAME);
         String password = props.getProperty(EmailPropertiesConstants.PASSWORD);
         session = Session.getDefaultInstance(createSessionProperties(host, 
port, isUseSSL, isDebug), getSessionAuthenticator(username, password));

Reply via email to