/src/main/java/net/finmath/montecarlo/interestrate/products/SwapLeg.java
final double periodLength = periodIndex.getPeriodLength( legSchedule) ;
final double periodLength = legSchedule.getPeriodLength ( periodIndex ) ;
for(int periodIndex=0; periodIndex<legSchedule.getNumberOfPeriods(); periodIndex++) { final LocalDateTime referenceDate = LocalDateTime.of(legSchedule.getReferenceDate(), LocalTime.of(0, 0)); final double periodStart = legSchedule.getPeriodStart(periodIndex); final double periodEnd = legSchedule.getPeriodEnd(periodIndex); final double fixingDate = legSchedule.getFixing(periodIndex); final double paymentDate = legSchedule.getPayment(periodIndex); <extra_id_0> if(periodLength == 0) { continue; } AbstractIndex coupon; if(index != null) { if(spreads[periodIndex] != 0) {