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 2022/10/23 05:50:56 UTC

[GitHub] [dolphinscheduler] pandong2011 commented on pull request #12495: [fix#12439] [Alert] fix send script alert NPE

pandong2011 commented on PR #12495:
URL: https://github.com/apache/dolphinscheduler/pull/12495#issuecomment-1288012465

   > good job
   > 
   > @pandong2011 , please update `format violations`, you can check the following message,
   > 
   > Error: Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.27.2:check (default) on project dolphinscheduler-alert-script: The following files had format violations: Error: src/main/java/org/apache/dolphinscheduler/plugin/alert/script/ScriptAlertChannel.java Error: @@ -17,12 +17,13 @@ Error: Error: package·org.apache.dolphinscheduler.plugin.alert.script; Error: Error: -import·org.apache.commons.collections.MapUtils; Error: import·org.apache.dolphinscheduler.alert.api.AlertChannel; Error: import·org.apache.dolphinscheduler.alert.api.AlertData; Error: import·org.apache.dolphinscheduler.alert.api.AlertInfo; Error: import·org.apache.dolphinscheduler.alert.api.AlertResult; Error: Error: +import·org.apache.commons.collections.MapUtils; Error: + Error: import·java.util.Map; Error: Error: public·final·class·ScriptAlertChannel·implements·AlertChannel·{ Error: src/main/java/org/apache/dolphinscheduler/plugin/alert/script/ScriptSender.java Error: @@ -18,11 +18
 ,11 @@ Error: package·org.apache.dolphinscheduler.plugin.alert.script; Error: Error: import·org.apache.dolphinscheduler.alert.api.AlertResult; Error: +import·org.apache.dolphinscheduler.spi.utils.StringUtils; Error: Error: import·java.io.File; Error: import·java.util.Map; Error: Error: -import·org.apache.dolphinscheduler.spi.utils.StringUtils; Error: import·org.slf4j.Logger; Error: import·org.slf4j.LoggerFactory; Error: Error: @@ -37,9 +37,15 @@ Error: ····private·final·String·userParams; Error: Error: ····ScriptSender(Map<String,·String>·config)·{ Error: -········scriptPath·=·StringUtils.isNotBlank(config.get(ScriptParamsConstants.NAME_SCRIPT_PATH))?·config.get(ScriptParamsConstants.NAME_SCRIPT_PATH):""; Error: -········scriptType·=·StringUtils.isNotBlank(config.get(ScriptParamsConstants.NAME_SCRIPT_TYPE))?·config.get(ScriptParamsConstants.NAME_SCRIPT_TYPE):""; Error: -········userParams·=·StringUtils.isNotBlank(config.get(Scrip
 tParamsConstants.NAME_SCRIPT_USER_PARAMS))?·config.get(ScriptParamsConstants.NAME_SCRIPT_USER_PARAMS):""; Error: +········scriptPath·=·StringUtils.isNotBlank(config.get(ScriptParamsConstants.NAME_SCRIPT_PATH)) Error: +················?·config.get(ScriptParamsConstants.NAME_SCRIPT_PATH) Error: +················:·""; Error: +········scriptType·=·StringUtils.isNotBlank(config.get(ScriptParamsConstants.NAME_SCRIPT_TYPE)) Error: +················?·config.get(ScriptParamsConstants.NAME_SCRIPT_TYPE) Error: +················:·""; Error: +········userParams·=·StringUtils.isNotBlank(config.get(ScriptParamsConstants.NAME_SCRIPT_USER_PARAMS)) Error: +················?·config.get(ScriptParamsConstants.NAME_SCRIPT_USER_PARAMS) Error: +················:·""; Error: ····} Error: Error: ····AlertResult·sendScriptAlert(String·title,·String·content)·{ Error: 
 @@ -47,7 +53,7 @@ Error: ... (8 more lines that didn't fit) Error: Run 'mvn spotless:apply' to fix these violations. Error: -> [Help 1] Error: Error: To see the full stack trace of the errors, re-run Maven with the -e switch. Error: Re-run Maven using the -X switch to enable full debug logging. Error: Error: For more information about the errors and possible solutions, please read the following articles: Error: [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException Error: Error: After correcting the problems, you can resume the build with the command Error: mvn -rf :dolphinscheduler-alert-script
   
   Ok, I'll do it


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org