diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2020-08-17 16:10:03 -0500 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2020-08-25 20:06:35 +0000 |
commit | 60c64b2c9f95bb52d070758fa88a3881ae69b5e7 (patch) | |
tree | 25e13b5141a39abcdb4c4a618b5fb5d67c50e602 /sonar-plugin-api/src/main/java/org/sonar/api | |
parent | 44dca753dbe146624059f8ac076433f403882487 (diff) | |
download | sonarqube-60c64b2c9f95bb52d070758fa88a3881ae69b5e7.tar.gz sonarqube-60c64b2c9f95bb52d070758fa88a3881ae69b5e7.zip |
SONAR-13766 PostProjectAnalysisTask's 'description' is a breaking change
Diffstat (limited to 'sonar-plugin-api/src/main/java/org/sonar/api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/ce/posttask/PostProjectAnalysisTask.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/ce/posttask/PostProjectAnalysisTask.java b/sonar-plugin-api/src/main/java/org/sonar/api/ce/posttask/PostProjectAnalysisTask.java index 5f1b61ec978..0f581e4d603 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/ce/posttask/PostProjectAnalysisTask.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/ce/posttask/PostProjectAnalysisTask.java @@ -46,19 +46,25 @@ public interface PostProjectAnalysisTask { * A short description or name for the task. * <p> * This will be used (but not limited to) in logs reporting the execution of the task. + * @since 8.0 */ - String getDescription(); + default String getDescription() { + return this.getClass().getSimpleName(); + } /** * This method is called whenever the processing of a Project analysis has finished, whether successfully or not. * - * @deprecated implement {@link #finished(Context)} instead + * @deprecated in 8.0. Implement {@link #finished(Context)} instead */ @Deprecated default void finished(ProjectAnalysis analysis) { throw new IllegalStateException("Provide an implementation of method finished(Context)"); } + /** + * @since 8.0 + */ default void finished(Context context) { finished(context.getProjectAnalysis()); } |