diff options
-rw-r--r-- | sonar-server/src/main/java/org/sonar/server/debt/DebtModelBackup.java | 3 | ||||
-rw-r--r-- | sonar-server/src/main/java/org/sonar/server/debt/DebtModelXMLExporter.java | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/sonar-server/src/main/java/org/sonar/server/debt/DebtModelBackup.java b/sonar-server/src/main/java/org/sonar/server/debt/DebtModelBackup.java index b66e8bceb33..7c6ae137ce2 100644 --- a/sonar-server/src/main/java/org/sonar/server/debt/DebtModelBackup.java +++ b/sonar-server/src/main/java/org/sonar/server/debt/DebtModelBackup.java @@ -238,7 +238,7 @@ public class DebtModelBackup implements ServerComponent { List<CharacteristicDto> result = newArrayList(); - // Restore not existing characteristics + // Create new characteristics for (DebtCharacteristic characteristic : targetModel.rootCharacteristics()) { CharacteristicDto rootCharacteristicDto = restoreCharacteristic(characteristic, null, sourceCharacteristics, updateDate, session); result.add(rootCharacteristicDto); @@ -366,5 +366,4 @@ public class DebtModelBackup implements ServerComponent { UserSession.get().checkGlobalPermission(GlobalPermissions.SYSTEM_ADMIN); } - } diff --git a/sonar-server/src/main/java/org/sonar/server/debt/DebtModelXMLExporter.java b/sonar-server/src/main/java/org/sonar/server/debt/DebtModelXMLExporter.java index 37cb409e411..e837598ebb7 100644 --- a/sonar-server/src/main/java/org/sonar/server/debt/DebtModelXMLExporter.java +++ b/sonar-server/src/main/java/org/sonar/server/debt/DebtModelXMLExporter.java @@ -228,14 +228,13 @@ public class DebtModelXMLExporter implements ServerComponent { }, null); } - @CheckForNull public DebtCharacteristic characteristicById(final Integer id) { return Iterables.find(characteristicsByRootKey.values(), new Predicate<DebtCharacteristic>() { @Override public boolean apply(DebtCharacteristic input) { return id.equals(input.id()); } - }, null); + }); } private List<DebtCharacteristic> sortByOrder(List<DebtCharacteristic> characteristics) { |