// TODO: code review :: please verify against QL/C++ code
QL.require(firstPeriodDayCounter_==null || !firstPeriodDayCounter_.equals(paymentDayCounter_) , "regular first coupon does not allow a first-period day count"); // TODO: message
leg.add(new FixedRateCoupon(nominal, paymentDate, rate, paymentDayCounter_, start, end, start, end));
} else {
Date ref = end.sub(schedule_.tenor());
ref = calendar.adjust(ref, schedule_.businessDayConvention());
// FIXME: empty() method on dayCounter missing --> substituted by == null (probably incorrect)
final DayCounter dc = (firstPeriodDayCounter_ == null) ? paymentDayCounter_ : firstPeriodDayCounter_;
leg.add(new FixedRateCoupon(nominal, paymentDate, rate, dc, start, end, ref, end));
}
// regular periods