branch develop updated (104bfed2 -> 26a8fab7)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git from 104bfed2 Les textes débordent en dessous des cases de résultat quand l'écran est trop petit new 26a8fab7 correction du dépouillement du vote alternatif (problème si des candidats n'ont aucun vote premier) The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 26a8fab71d63d4e0e1f8061a9edf77c10ed05bd4 Author: Kevin Morin <morin@codelutin.com> Date: Mon Sep 11 16:35:51 2017 +0200 correction du dépouillement du vote alternatif (problème si des candidats n'ont aucun vote premier) Summary of changes: .../votecounting/InstantRunoffVoteCountingStrategy.java | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 26a8fab71d63d4e0e1f8061a9edf77c10ed05bd4 Author: Kevin Morin <morin@codelutin.com> Date: Mon Sep 11 16:35:51 2017 +0200 correction du dépouillement du vote alternatif (problème si des candidats n'ont aucun vote premier) --- .../votecounting/InstantRunoffVoteCountingStrategy.java | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/pollen-votecounting-instant-runoff/src/main/java/org/chorem/pollen/votecounting/InstantRunoffVoteCountingStrategy.java b/pollen-votecounting-instant-runoff/src/main/java/org/chorem/pollen/votecounting/InstantRunoffVoteCountingStrategy.java index 60c23520..ed08962a 100644 --- a/pollen-votecounting-instant-runoff/src/main/java/org/chorem/pollen/votecounting/InstantRunoffVoteCountingStrategy.java +++ b/pollen-votecounting-instant-runoff/src/main/java/org/chorem/pollen/votecounting/InstantRunoffVoteCountingStrategy.java @@ -194,20 +194,11 @@ public class InstantRunoffVoteCountingStrategy extends AbstractVoteCountingStrat results.add(resultByChoice.get(id)); } - results.sort(Comparator.comparing(ChoiceScore::getScoreValue, Comparator.nullsLast(Comparator.naturalOrder()))); + results.sort(Comparator.comparing(ChoiceScore::getScoreValue, Comparator.nullsFirst(Comparator.naturalOrder()))); // on supprime tout score à 0 - Iterator<ChoiceScore> itr = results.iterator(); - while (itr.hasNext()) { - ChoiceScore choiceScore = itr.next(); - if (choiceScore.getScoreValue() == null || - ZERO_D.equals(choiceScore.getScoreValue())) { - itr.remove(); - } else { - // score > 0 on peut s'arreter - break; - } - } + results.removeIf(choiceScore -> choiceScore.getScoreValue() == null + || ZERO_D.equals(choiceScore.getScoreValue())); return results; } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm