aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch/src
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2013-05-29 23:13:08 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2013-05-29 23:13:08 +0200
commitd864b2120708473a363bed2f4fa50ecdf73762a1 (patch)
treec110e994f74e12202f9111fab692ed0298a5f1f7 /sonar-batch/src
parent80fb6e85116635811a262052da8d740ab178ca55 (diff)
downloadsonarqube-d864b2120708473a363bed2f4fa50ecdf73762a1.tar.gz
sonarqube-d864b2120708473a363bed2f4fa50ecdf73762a1.zip
Fix some quality flaws
Diffstat (limited to 'sonar-batch/src')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/ProjectConfigurator.java15
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/ProjectConfiguratorTest.java2
2 files changed, 9 insertions, 8 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/ProjectConfigurator.java b/sonar-batch/src/main/java/org/sonar/batch/ProjectConfigurator.java
index 3498c241c61..d5caa5bde19 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/ProjectConfigurator.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/ProjectConfigurator.java
@@ -70,18 +70,19 @@ public class ProjectConfigurator implements BatchComponent {
checkCurrentAnalyisIsTheLatestOne(project, analysisDate);
project
- .setConfiguration(new PropertiesConfiguration()) // will be populated by ProjectSettings
- .setAnalysisDate(analysisDate)
- .setAnalysisVersion(loadAnalysisVersion())
- .setAnalysisType(loadAnalysisType());
+ .setConfiguration(new PropertiesConfiguration()) // will be populated by ProjectSettings
+ .setAnalysisDate(analysisDate)
+ .setAnalysisVersion(loadAnalysisVersion())
+ .setAnalysisType(loadAnalysisType());
return this;
}
- private void checkCurrentAnalyisIsTheLatestOne(Project project, Date analysisDate){
+ private void checkCurrentAnalyisIsTheLatestOne(Project project, Date analysisDate) {
if (!isLatestAnalysis(project.getKey(), analysisDate)) {
throw new IllegalArgumentException(
- "The value '"+ settings.getString(CoreProperties.PROJECT_DATE_PROPERTY) +"' of the sonar.projectDate property can't be older than the date of last known quality snapshot " +
- "on this project. This property must be used to replay the past in a chronological order.");
+ "The value '" + settings.getString(CoreProperties.PROJECT_DATE_PROPERTY) + "' of the sonar.projectDate property " +
+ "can't be older than the date of last known quality snapshot " +
+ "on this project. This property must only be used to rebuild the past in a chronological order.");
}
}
diff --git a/sonar-batch/src/test/java/org/sonar/batch/ProjectConfiguratorTest.java b/sonar-batch/src/test/java/org/sonar/batch/ProjectConfiguratorTest.java
index 7daa14f9c90..ce13c0b7177 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/ProjectConfiguratorTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/ProjectConfiguratorTest.java
@@ -155,7 +155,7 @@ public class ProjectConfiguratorTest extends AbstractDbUnitTestCase {
fail();
} catch (Exception e) {
assertThat(e).isInstanceOf(IllegalArgumentException.class).hasMessage("The value '2005-12-25' of the sonar.projectDate property can't be older than the date " +
- "of last known quality snapshot on this project. This property must be used to replay the past in a chronological order.");
+ "of last known quality snapshot on this project. This property must only be used to rebuild the past in a chronological order.");
}
}