/src/main/java/net/finmath/modelling/productfactory/InterestRateAnalyticProductFactory.java
else if( descriptor && InterestRateSwapProductDescriptor) {
else if ( descriptor instanceof InterestRateSwapProductDescriptor ) {
final InterestRateSwapLegProductDescriptor swapLeg = (InterestRateSwapLegProductDescriptor) descriptor; final DescribedProduct<InterestRateSwapLegProductDescriptor> product = new SwapLeg(swapLeg.getLegScheduleDescriptor().getSchedule(referenceDate), swapLeg.getForwardCurveName(), swapLeg.getNotionals(), swapLeg.getSpreads(), swapLeg.getDiscountCurveName(), swapLeg.isNotionalExchanged()); return product; } <extra_id_0> final InterestRateSwapProductDescriptor swap = (InterestRateSwapProductDescriptor) descriptor; InterestRateProductDescriptor legDescriptor = swap.getLegReceiver(); final AnalyticProduct legReceiver = (AnalyticProduct) getProductFromDescriptor(legDescriptor); legDescriptor = swap.getLegPayer(); final AnalyticProduct legPayer = (AnalyticProduct) getProductFromDescriptor(legDescriptor); final DescribedProduct<InterestRateSwapProductDescriptor> product = new Swap(legReceiver, legPayer);