diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-07-01 18:47:44 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-07-01 18:48:05 +0200 |
commit | da03d2e8386d74283212a3f66ecf13eaa640367f (patch) | |
tree | 29aac45c00aff382680c0da6addb7ea13665576a /sonar-batch | |
parent | 313fe9a7fb0ed72ba098265c0b45d4ea44340000 (diff) | |
download | sonarqube-da03d2e8386d74283212a3f66ecf13eaa640367f.tar.gz sonarqube-da03d2e8386d74283212a3f66ecf13eaa640367f.zip |
Fix quality flaws
Diffstat (limited to 'sonar-batch')
-rw-r--r-- | sonar-batch/src/main/java/org/sonar/batch/index/ResourceKeyMigration.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/index/ResourceKeyMigration.java b/sonar-batch/src/main/java/org/sonar/batch/index/ResourceKeyMigration.java index 4276fddf6c2..0cb5a0b182d 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/index/ResourceKeyMigration.java +++ b/sonar-batch/src/main/java/org/sonar/batch/index/ResourceKeyMigration.java @@ -116,12 +116,12 @@ public class ResourceKeyMigration implements BatchComponent { Resource sonarFile; String parentOldKey; if ("java".equals(resourceModel.getLanguageKey())) { - parentOldKey = module.getEffectiveKey() + ":" + DeprecatedKeyUtils.getJavaFileParentDeprecatedKey(oldKey); + parentOldKey = String.format("%s:%s", module.getEffectiveKey(), DeprecatedKeyUtils.getJavaFileParentDeprecatedKey(oldKey)); } else { sonarFile = new File(oldKey); - parentOldKey = module.getEffectiveKey() + ":" + sonarFile.getParent().getDeprecatedKey(); + parentOldKey = String.format("%s:%s", module.getEffectiveKey(), sonarFile.getParent().getDeprecatedKey()); } - String parentNewKey = module.getEffectiveKey() + ":" + getParentKey(matchedFile); + String parentNewKey = String.format("%s:%s", module.getEffectiveKey(), getParentKey(matchedFile)); if (!deprecatedDirectoryKeyMapper.containsKey(parentOldKey)) { deprecatedDirectoryKeyMapper.put(parentOldKey, parentNewKey); } else if (!parentNewKey.equals(deprecatedDirectoryKeyMapper.get(parentOldKey))) { |