discountingMap.put(curveName, currency);
} catch (final IllegalArgumentException e) {
throw new OpenGammaRuntimeException("Cannot handle reference type " + reference + " for discounting curves");
}
} else if (type instanceof IborCurveTypeConfiguration) {
final IborCurveTypeConfiguration ibor = (IborCurveTypeConfiguration) type;
final Convention convention = conventionSource.getConvention(ibor.getConvention());
if (convention == null) {
throw new OpenGammaRuntimeException("Convention " + ibor.getConvention() + " was null");
}
if (!(convention instanceof IborIndexConvention)) {
throw new OpenGammaRuntimeException("Expecting convention of type IborIndexConvention; have " + convention.getClass());
}
final IborIndexConvention iborIndexConvention = (IborIndexConvention) convention;
final int spotLag = iborIndexConvention.getSettlementDays();
iborIndex.add(new IborIndex(iborIndexConvention.getCurrency(), ibor.getTenor().getPeriod(), spotLag, iborIndexConvention.getDayCount(),
iborIndexConvention.getBusinessDayConvention(), iborIndexConvention.isIsEOM(), iborIndexConvention.getName()));
} else if (type instanceof OvernightCurveTypeConfiguration) {
final OvernightCurveTypeConfiguration overnight = (OvernightCurveTypeConfiguration) type;
final Convention convention = conventionSource.getConvention(overnight.getConvention());
if (convention == null) {