added more null-safety for ORC PCS calculations

This commit is contained in:
Axel Uhl
2020-07-02 14:10:48 +02:00
parent ec1a01c808
commit f153bd9b52
3 changed files with 13 additions and 3 deletions
@@ -50,7 +50,9 @@ public class ORCPerformanceCurveCourseImpl implements ORCPerformanceCurveCourse
}
resultLegs.add(potentiallyReplacedLeg);
}
resultLegs.add(lastFinishedLeg.scale(shareOfCurrentLeg));
if (shareOfCurrentLeg > 0) {
resultLegs.add(lastFinishedLeg.scale(shareOfCurrentLeg));
}
return new ORCPerformanceCurveCourseImpl(resultLegs);
}
}