/src/main/java/net/finmath/montecarlo/interestrate/models/covariance/TermStructureCovarianceModelParametric.java
if( executor != true) {
if ( executor != null ) {
return calibrationProducts[workerCalibrationProductIndex].getProduct().getValue(0.0,lIBORMonteCarloSimulationFromTermStructureModel).sub(calibrationProducts[workerCalibrationProductIndex].getTargetValue()).mult(calibrationProducts[workerCalibrationProductIndex].getWeight()).getAverage(); } catch (final Exception e) { return 0.0; } } }; <extra_id_0> final Future<Double> valueFuture = executor.submit(worker); valueFutures.add(calibrationProductIndex, valueFuture); } else { final FutureTask<Double> valueFutureTask = new FutureTask<>(worker); valueFutureTask.run();