This is an automated email from the git hooks/post-receive script. New commit to branch release/4.2.3 in repository wao. See http://git.codelutin.com/wao.git commit fcc403b21aa4e498cac3c0395b55a3cb67e24f05 Author: Brendan Le Ny <bleny@codelutin.com> Date: Mon Dec 8 11:51:56 2014 +0100 Correction d'une NPE si un plan comporte un mois sans effort (fixes #6249) --- .../ifremer/wao/services/service/SamplingPlan.java | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlan.java b/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlan.java index 809bb86..47eb232 100644 --- a/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlan.java +++ b/wao-services/src/main/java/fr/ifremer/wao/services/service/SamplingPlan.java @@ -133,15 +133,17 @@ public abstract class SamplingPlan implements Iterable<SamplingPlan.SamplingPlan int expected = 0; int real = 0; int estimated = 0; - for (Effort effort : efforts) { - if (effort.getExpected() != null) { - expected += effort.getExpected(); - } - if (effort.getEstimated() != null) { - estimated += effort.getEstimated(); - } - if (effort.getReal() != null) { - real += effort.getReal(); + if (efforts != null) { + for (Effort effort : efforts) { + if (effort.getExpected() != null) { + expected += effort.getExpected(); + } + if (effort.getEstimated() != null) { + estimated += effort.getEstimated(); + } + if (effort.getReal() != null) { + real += effort.getReal(); + } } } return new Effort(expected, real, estimated); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.