]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-4535 Fix issue when template rule are in the result
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Mon, 23 Dec 2013 15:42:40 +0000 (16:42 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Mon, 23 Dec 2013 15:42:40 +0000 (16:42 +0100)
sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfileRule.java

index 7eaa5b4334efb3ffd6dc93a5107a3b5df17f9a69..a3d595197382393393d4a8bfefb65c795ef6b9fe 100644 (file)
@@ -42,7 +42,7 @@ public class QProfileRule {
   private final String description;
   private final String status;
   private final String cardinality;
-  private final String parentKey;
+  private final Integer parentId;
   private final Date createdAt;
   private final Date updatedAt;
   private final QProfileRuleNote ruleNote;
@@ -62,7 +62,7 @@ public class QProfileRule {
     description = (String) ruleSource.get(RuleDocument.FIELD_DESCRIPTION);
     status = (String) ruleSource.get(RuleDocument.FIELD_STATUS);
     cardinality = (String) ruleSource.get("cardinality");
-    parentKey = (String) ruleSource.get(RuleDocument.FIELD_PARENT_KEY);
+    parentId = (Integer) ruleSource.get(RuleDocument.FIELD_PARENT_KEY);
     createdAt = parseOptionalDate(RuleDocument.FIELD_CREATED_AT, ruleSource);
     updatedAt = parseOptionalDate(RuleDocument.FIELD_UPDATED_AT, ruleSource);
 
@@ -199,7 +199,7 @@ public class QProfileRule {
   }
 
   public boolean isEditable() {
-    return parentKey != null;
+    return parentId != null;
   }
 
   public List<QProfileRuleParam> params() {