diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2017-07-10 10:38:27 +0200 |
---|---|---|
committer | Duarte Meneses <duarte.meneses@sonarsource.com> | 2017-07-11 08:51:38 +0200 |
commit | 6f107dcbe90b0fea564e1ecaa96643bfc539329a (patch) | |
tree | 45478253f6006a0f1381fb506f92852ad2f5c5df /sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java | |
parent | f6a0f6bb86f7d244bec0b6781020e2ea066124c6 (diff) | |
download | sonarqube-6f107dcbe90b0fea564e1ecaa96643bfc539329a.tar.gz sonarqube-6f107dcbe90b0fea564e1ecaa96643bfc539329a.zip |
SONAR-9477 Deprecate ProjectReactor and ProjectBuilder
Mark Immutable classes in the Plugin API and Scanner
Diffstat (limited to 'sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java index 4cb9ded0ef5..65752a177c6 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Project.java @@ -28,6 +28,7 @@ import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.builder.ToStringBuilder; import org.sonar.api.batch.bootstrap.ProjectDefinition; import org.sonar.api.batch.fs.InputModule; +import org.sonar.api.batch.fs.internal.DefaultInputModule; import org.sonar.api.component.Component; import org.sonar.api.scan.filesystem.PathResolver; @@ -39,6 +40,10 @@ import org.sonar.api.scan.filesystem.PathResolver; public class Project extends Resource implements Component { private final ProjectDefinition definition; + public Project(DefaultInputModule module) { + this(module.definition()); + } + public Project(ProjectDefinition definition) { this.definition = definition; this.setKey(definition.getKey()); |