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-scanner-engine/src/main/java/org/sonar/scanner/analysis/AnalysisTempFolderProvider.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-scanner-engine/src/main/java/org/sonar/scanner/analysis/AnalysisTempFolderProvider.java')
-rw-r--r-- | sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/AnalysisTempFolderProvider.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/AnalysisTempFolderProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/AnalysisTempFolderProvider.java index dc4a860533c..1c0ec317ad7 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/AnalysisTempFolderProvider.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/analysis/AnalysisTempFolderProvider.java @@ -22,10 +22,11 @@ package org.sonar.scanner.analysis; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; + import org.picocontainer.ComponentLifecycle; import org.picocontainer.PicoContainer; import org.picocontainer.injectors.ProviderAdapter; -import org.sonar.api.batch.bootstrap.ProjectReactor; +import org.sonar.api.batch.fs.internal.InputModuleHierarchy; import org.sonar.api.utils.TempFolder; import org.sonar.api.utils.internal.DefaultTempFolder; @@ -34,9 +35,9 @@ public class AnalysisTempFolderProvider extends ProviderAdapter implements Compo private DefaultTempFolder projectTempFolder; private boolean started = false; - public TempFolder provide(ProjectReactor projectReactor) { + public TempFolder provide(InputModuleHierarchy moduleHierarchy) { if (projectTempFolder == null) { - Path workingDir = projectReactor.getRoot().getWorkDir().toPath(); + Path workingDir = moduleHierarchy.root().getWorkDir().toPath(); Path tempDir = workingDir.normalize().resolve(TMP_NAME); try { Files.deleteIfExists(tempDir); @@ -64,7 +65,7 @@ public class AnalysisTempFolderProvider extends ProviderAdapter implements Compo @Override public void dispose(PicoContainer container) { - //nothing to do + // nothing to do } @Override |