Small change to support null progressmeter while calculating "monte carlo" method.
FEA: ItEr63OTS06MonteCarlo
This commit is contained in:
parent
42c2cb68ec
commit
4143061b4d
1 changed files with 5 additions and 6 deletions
|
|
@ -52,9 +52,6 @@ import org.springframework.beans.factory.config.BeanDefinition;
|
|||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.zkoss.zk.ui.Desktop;
|
||||
import org.zkoss.zk.ui.DesktopUnavailableException;
|
||||
import org.zkoss.zk.ui.Executions;
|
||||
import org.zkoss.zul.Progressmeter;
|
||||
|
||||
/**
|
||||
|
|
@ -515,9 +512,11 @@ public class MonteCarloModel implements IMonteCarloModel {
|
|||
}
|
||||
|
||||
private void increaseProgressMeter() {
|
||||
final int currentValue = progressmeter.getValue();
|
||||
progressmeter.setValue(currentValue + 1);
|
||||
progressmeter.invalidate();
|
||||
if (progressmeter != null) {
|
||||
final int currentValue = progressmeter.getValue();
|
||||
progressmeter.setValue(currentValue + 1);
|
||||
progressmeter.invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
private LocalDate calculateEndDateFor(List<MonteCarloTask> tasks,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue