return changed;
}
private boolean mergeDebtDefinitions(RulesDefinition.Rule def, RuleDto dto, @Nullable CharacteristicDto subCharacteristic) {
// Debt definitions are set to null if the sub-characteristic and the remediation function are null
DebtRemediationFunction debtRemediationFunction = subCharacteristic != null ? def.debtRemediationFunction() : null;
boolean hasDebt = subCharacteristic != null && debtRemediationFunction != null;
if (hasDebt) {
return mergeDebtDefinitions(def, dto,
subCharacteristic.getId(),
debtRemediationFunction.type().name(),
debtRemediationFunction.coefficient(),
debtRemediationFunction.offset(),
def.effortToFixDescription());
}
return mergeDebtDefinitions(def, dto, null, null, null, null, null);
}