}
static WorkDuration createFromMinutes(long duration, int hoursInDay) {
- int days = ((Double) (duration / hoursInDay / 60d)).intValue();
+ int days = ((Double) ((double) duration / hoursInDay / 60d)).intValue();
Long currentDurationInMinutes = duration - (60L * days * hoursInDay);
int hours = ((Double) (currentDurationInMinutes / 60d)).intValue();
currentDurationInMinutes = currentDurationInMinutes - (60L * hours);
boolean changed = false;
CharacteristicDto characteristic = findCharacteristic(characteristicDtos, def);
+ // Debt definitions are set to null if the characteristic is null or unknown
Integer characteristicId = characteristic != null ? characteristic.getId() : null;
RemediationFunction remediationFunction = characteristic != null ? def.remediationFunction() : null;
String remediationFactor = characteristic != null ? def.remediationFactor() : null;