]> source.dussan.org Git - sonarqube.git/commitdiff
Fix restoring of backups when rules not found
authorsimonbrandhof <simon.brandhof@gmail.com>
Fri, 4 Feb 2011 10:09:26 +0000 (11:09 +0100)
committersimonbrandhof <simon.brandhof@gmail.com>
Fri, 4 Feb 2011 10:09:26 +0000 (11:09 +0100)
sonar-server/src/main/java/org/sonar/server/configuration/ProfilesBackup.java

index 143427d6457de21eb0ee8f047ecf18e2861ed8c6..4dcd6e1b1e37b3e282a021295445c573f5485951 100644 (file)
@@ -113,7 +113,7 @@ public class ProfilesBackup implements Backupable {
   }
 
   private void importActiveRules(RulesDao rulesDao, RulesProfile profile) {
-    for (Iterator<ActiveRule> iar = profile.getActiveRules().iterator(); iar.hasNext();) {
+    for (Iterator<ActiveRule> iar = profile.getActiveRules(true).iterator(); iar.hasNext();) {
       ActiveRule activeRule = iar.next();
       Rule unMarshalledRule = activeRule.getRule();
       Rule matchingRuleInDb = rulesDao.getRuleByKey(unMarshalledRule.getRepositoryKey(), unMarshalledRule.getKey());