aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2011-06-07 11:07:25 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2011-06-07 11:07:43 +0200
commitef65872944bde77d948cf6bd0185acdbd36d28c4 (patch)
tree2e50b95ebe04189f53492adfff39be67b57dd58e /sonar-batch
parent7026f003b50c1b9cc78ec03c4d92662b6ea885f5 (diff)
downloadsonarqube-ef65872944bde77d948cf6bd0185acdbd36d28c4.tar.gz
sonarqube-ef65872944bde77d948cf6bd0185acdbd36d28c4.zip
Do not allow to change ProjectDefinition#properties
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/MavenProjectConverter.java5
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrapper/ProjectDefinition.java5
2 files changed, 4 insertions, 6 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/MavenProjectConverter.java b/sonar-batch/src/main/java/org/sonar/batch/MavenProjectConverter.java
index ec3104f755c..5c35f335a1d 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/MavenProjectConverter.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/MavenProjectConverter.java
@@ -66,9 +66,8 @@ public final class MavenProjectConverter {
*/
static ProjectDefinition convert(MavenProject pom) {
String key = new StringBuilder().append(pom.getGroupId()).append(":").append(pom.getArtifactId()).toString();
- ProjectDefinition definition = ProjectDefinition.create();
- definition.setProperties(pom.getModel().getProperties())
- .setKey(key)
+ ProjectDefinition definition = ProjectDefinition.create(pom.getModel().getProperties());
+ definition.setKey(key)
.setVersion(pom.getVersion())
.setName(pom.getName())
.setDescription(pom.getDescription())
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/ProjectDefinition.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/ProjectDefinition.java
index 0c59c799935..71f3861f941 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/ProjectDefinition.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrapper/ProjectDefinition.java
@@ -42,10 +42,9 @@ public class ProjectDefinition {
* @param properties project properties
*/
public ProjectDefinition(File baseDir, File workDir, Properties properties) {
- target = org.sonar.api.batch.bootstrap.ProjectDefinition.create()
+ target = org.sonar.api.batch.bootstrap.ProjectDefinition.create(properties)
.setBaseDir(baseDir)
- .setWorkDir(workDir)
- .setProperties(properties);
+ .setWorkDir(workDir);
}
public File getBaseDir() {