You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2020/04/13 06:38:37 UTC

[GitHub] [incubator-dolphinscheduler] Technoboy- commented on a change in pull request #2402: simplify and optimize config

Technoboy- commented on a change in pull request #2402: simplify and optimize config
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2402#discussion_r407341758
 
 

 ##########
 File path: dolphinscheduler-alert/src/main/java/org/apache/dolphinscheduler/alert/template/AlertTemplateFactory.java
 ##########
 @@ -30,25 +27,13 @@
 
     private static final Logger logger = LoggerFactory.getLogger(AlertTemplateFactory.class);
 
-    private static final String alertTemplate = PropertyUtils.getString(Constants.ALERT_TEMPLATE);
-
     private AlertTemplateFactory(){}
 
     /**
      * get a template from alert.properties conf file
      * @return a template, default is DefaultHTMLTemplate
      */
     public static AlertTemplate getMessageTemplate() {
-
-        if(StringUtils.isEmpty(alertTemplate)){
-            return new DefaultHTMLTemplate();
-        }
-
-        switch (alertTemplate){
 
 Review comment:
   why delete these?
   We can add like 'simpleTextTemplate' implementations in the future, and config it simply.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services