Skip to content

Commit

Permalink
Use defaults instead of null in IborRateSwapLegConvention (OpenGamma#…
Browse files Browse the repository at this point in the history
…2622)

* PROD-29409: default stub convention to SI

* PROD-29409: use getters everywhere

* default only stub convention

* small copy paste fix

* another copy paste fix
  • Loading branch information
milenorf authored and sagiruthvik committed Nov 13, 2024
1 parent 261336c commit a63df5a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ public RateCalculationSwapLeg toLeg(
.businessDayAdjustment(accrualBusinessDayAdjustment)
.startDateBusinessDayAdjustment(startDateBusinessDayAdjustment)
.endDateBusinessDayAdjustment(endDateBusinessDayAdjustment)
.stubConvention(stubConvention)
.stubConvention(getStubConvention())
.rollConvention(rollConvention)
.build())
.paymentSchedule(PaymentSchedule.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ public RateCalculationSwapLeg toLeg(
.businessDayAdjustment(getAccrualBusinessDayAdjustment())
.startDateBusinessDayAdjustment(startDateBusinessDayAdjustment)
.endDateBusinessDayAdjustment(endDateBusinessDayAdjustment)
.stubConvention(stubConvention)
.stubConvention(getStubConvention())
.rollConvention(rollConvention)
.build())
.paymentSchedule(PaymentSchedule.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import static com.opengamma.strata.basics.schedule.Frequency.P3M;
import static com.opengamma.strata.basics.schedule.Frequency.P6M;
import static com.opengamma.strata.basics.schedule.StubConvention.LONG_INITIAL;
import static com.opengamma.strata.basics.schedule.StubConvention.SMART_INITIAL;
import static com.opengamma.strata.collect.TestHelper.assertSerialization;
import static com.opengamma.strata.collect.TestHelper.coverBeanEquals;
import static com.opengamma.strata.collect.TestHelper.coverImmutableBean;
Expand Down Expand Up @@ -152,6 +153,7 @@ public void test_toLeg() {
.startDate(startDate)
.endDate(endDate)
.businessDayAdjustment(BDA_MOD_FOLLOW)
.stubConvention(SMART_INITIAL)
.build())
.paymentSchedule(PaymentSchedule.builder()
.paymentFrequency(P3M)
Expand All @@ -178,6 +180,7 @@ public void test_toLeg_withSpread() {
.startDate(startDate)
.endDate(endDate)
.businessDayAdjustment(BDA_MOD_FOLLOW)
.stubConvention(SMART_INITIAL)
.build())
.paymentSchedule(PaymentSchedule.builder()
.paymentFrequency(P3M)
Expand Down

0 comments on commit a63df5a

Please sign in to comment.