diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-09-26 10:22:10 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-09-26 10:22:10 +0200 |
commit | 4234c8d5b402e751dfd0c17732cfc843ba807fe0 (patch) | |
tree | b4fd81647c26834baae2d8f2457b85472d89602f /sonar-batch-protocol/src/main/java | |
parent | 966878dbed44b73db1e5951056f9ee2bc617d652 (diff) | |
download | sonarqube-4234c8d5b402e751dfd0c17732cfc843ba807fe0.tar.gz sonarqube-4234c8d5b402e751dfd0c17732cfc843ba807fe0.zip |
Revert "SONAR-5473 Fix fetching of remote SCM data"
This reverts commit da96eeccbe28e91619d60b34ae91ad442de6ce08.
Diffstat (limited to 'sonar-batch-protocol/src/main/java')
-rw-r--r-- | sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/ProjectReferentials.java | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/ProjectReferentials.java b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/ProjectReferentials.java index d967e933de4..5e2bfafd59d 100644 --- a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/ProjectReferentials.java +++ b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/ProjectReferentials.java @@ -39,7 +39,7 @@ public class ProjectReferentials { private Map<String, QProfile> qprofilesByLanguage = new HashMap<String, QProfile>(); private Collection<ActiveRule> activeRules = new ArrayList<ActiveRule>(); private Map<String, Map<String, String>> settingsByModule = new HashMap<String, Map<String, String>>(); - private Map<String, Map<String, FileData>> fileDataByModuleAndPath = new HashMap<String, Map<String, FileData>>(); + private Map<String, FileData> fileDataPerPath = new HashMap<String, FileData>(); public Map<String, String> settings(String projectKey) { return settingsByModule.containsKey(projectKey) ? settingsByModule.get(projectKey) : Collections.<String, String>emptyMap(); @@ -49,9 +49,9 @@ public class ProjectReferentials { Map<String, String> existingSettings = settingsByModule.get(projectKey); if (existingSettings == null) { existingSettings = new HashMap<String, String>(); - settingsByModule.put(projectKey, existingSettings); } existingSettings.putAll(settings); + settingsByModule.put(projectKey, existingSettings); return this; } @@ -73,23 +73,13 @@ public class ProjectReferentials { return this; } - public Map<String, FileData> fileDataByPath(String projectKey) { - return fileDataByModuleAndPath.containsKey(projectKey) ? fileDataByModuleAndPath.get(projectKey) : Collections.<String, FileData>emptyMap(); - } - - public ProjectReferentials addFileData(String projectKey, String path, FileData fileData) { - Map<String, FileData> existingFileDataByPath = fileDataByModuleAndPath.get(projectKey); - if (existingFileDataByPath == null) { - existingFileDataByPath = new HashMap<String, FileData>(); - fileDataByModuleAndPath.put(projectKey, existingFileDataByPath); - } - existingFileDataByPath.put(path, fileData); - return this; + public Map<String, FileData> fileDataPerPath() { + return fileDataPerPath; } @CheckForNull - public FileData fileData(String projectKey, String path) { - return fileDataByPath(projectKey).get(path); + public FileData fileDataPerPath(String path) { + return fileDataPerPath.get(path); } public long timestamp() { |