diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2014-10-09 15:08:41 +0200 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2014-10-14 09:07:59 +0200 |
commit | ae034306558d3483eae35ada281036e53e833317 (patch) | |
tree | 90606fc616cd000da1dff198d495c0ed5115e1d6 /sonar-batch | |
parent | c8304e492d768415a90d4aace5defd8e49f9ce62 (diff) | |
download | sonarqube-ae034306558d3483eae35ada281036e53e833317.tar.gz sonarqube-ae034306558d3483eae35ada281036e53e833317.zip |
Improve logging
Diffstat (limited to 'sonar-batch')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/scm/DefaultBlameResult.java | 2 | ||||
-rw-r--r-- | sonar-batch/src/test/java/org/sonar/batch/scm/DefaultBlameResultTest.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/scm/DefaultBlameResult.java b/sonar-batch/src/main/java/org/sonar/batch/scm/DefaultBlameResult.java index 93269c7a32a..f62e3d00683 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/scm/DefaultBlameResult.java +++ b/sonar-batch/src/main/java/org/sonar/batch/scm/DefaultBlameResult.java @@ -52,7 +52,7 @@ class DefaultBlameResult implements BlameResult { Preconditions.checkNotNull(file); Preconditions.checkNotNull(lines); Preconditions.checkArgument(lines.size() == file.lines(), - "Expected one blame result per line but provider returned " + lines.size() + " blame lines while file has " + file.lines() + " lines"); + "Expected one blame result per line but provider returned " + lines.size() + " blame lines while file " + file.relativePath() + " has " + file.lines() + " lines"); PropertiesBuilder<Integer, String> authors = propertiesBuilder(CoreMetrics.SCM_AUTHORS_BY_LINE); PropertiesBuilder<Integer, String> dates = propertiesBuilder(CoreMetrics.SCM_LAST_COMMIT_DATETIMES_BY_LINE); diff --git a/sonar-batch/src/test/java/org/sonar/batch/scm/DefaultBlameResultTest.java b/sonar-batch/src/test/java/org/sonar/batch/scm/DefaultBlameResultTest.java index c64f7ebc6ee..90d7dc7e1f6 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/scm/DefaultBlameResultTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/scm/DefaultBlameResultTest.java @@ -38,7 +38,7 @@ public class DefaultBlameResultTest { InputFile file = new DefaultInputFile("foo", "src/main/java/Foo.java").setLines(10); thrown.expect(IllegalArgumentException.class); - thrown.expectMessage("Expected one blame result per line but provider returned 1 blame lines while file has 10 lines"); + thrown.expectMessage("Expected one blame result per line but provider returned 1 blame lines while file src/main/java/Foo.java has 10 lines"); new DefaultBlameResult(null).add(file, Arrays.asList(new BlameLine(null, "1", "guy"))); } |