]> source.dussan.org Git - sonarqube.git/commitdiff
Fix quality flaw
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Fri, 20 Feb 2015 11:15:44 +0000 (12:15 +0100)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Fri, 20 Feb 2015 11:15:44 +0000 (12:15 +0100)
server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/AddCharacteristicUsabilityAndSubCharacteristicsComplianceMigration.java

index 13314c2e0bae7cfe96990d53005fac8b46359684..7c5714413cb17dc7b0f78c401b58423cac47ab8b 100644 (file)
@@ -254,7 +254,7 @@ public class AddCharacteristicUsabilityAndSubCharacteristicsComplianceMigration
         Integer parentId = characteristic.getParentId();
         if (parentId == null) {
           throw MessageException.of(String.format("'%s' must be a sub-characteristic. " + ERROR_SUFFIX, characteristic.getName()));
-        } else if (!characteristic.getParentId().equals(parent.getId())) {
+        } else if (!parentId.equals(parent.getId())) {
           throw MessageException.of(String.format("'%s' must be defined under '%s'. " + ERROR_SUFFIX, characteristic.getName(), parent.getName()));
         }
       }