diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2015-02-13 11:35:49 +0100 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2015-02-13 12:11:17 +0100 |
commit | 23221e63fe143006af0adff8c58751e8a1402745 (patch) | |
tree | 09c647fc565f994e1622a6748328876e0f05feb8 /sonar-plugin-api | |
parent | ad4849391e6e2aa305b578dc3a10987d29946489 (diff) | |
download | sonarqube-23221e63fe143006af0adff8c58751e8a1402745.tar.gz sonarqube-23221e63fe143006af0adff8c58751e8a1402745.zip |
SONAR-6172 Do not fail when a file has no blame information
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/BlameCommand.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/BlameCommand.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/BlameCommand.java index b775385eabb..1c543d64515 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/BlameCommand.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/BlameCommand.java @@ -24,6 +24,8 @@ import org.sonar.api.batch.InstantiationStrategy; import org.sonar.api.batch.fs.FileSystem; import org.sonar.api.batch.fs.InputFile; +import javax.annotation.Nullable; + import java.util.List; /** @@ -66,8 +68,13 @@ public abstract class BlameCommand implements BatchComponent { /** * Add result of the blame command for a single file. Number of lines should * be consistent with {@link InputFile#lines()}. This method is thread safe. + * @param lines One entry per line in the file. Can return null since 5.1 to + * express the provider was not able to collect blame for the file but that should + * not fail the analysis (for example when file is uncommited). The platform will + * log a warning in this case. It is up to the provider to log debug info so that + * user can understand why the file has no blame. */ - void blameResult(InputFile file, List<BlameLine> lines); + void blameResult(InputFile file, @Nullable List<BlameLine> lines); } |