[pollen] branch develop updated (a1a6b59 -> 0afdf5d)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository pollen. See http://git.chorem.org/pollen.git from a1a6b59 fixes #1114 poll edit : translate the popup to add or edit a choice new 0afdf5d Improve list of voteCounting, no depend of voteCounting id 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 0afdf5d7fb4f4d8d0b3f1320b5a22106936648ca Author: Dralagen <dralagen@dralagen.fr> Date: Wed Oct 22 17:59:44 2014 +0200 Improve list of voteCounting, no depend of voteCounting id Summary of changes: .../services/service/VoteCountingTypeService.java | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 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 http://git.chorem.org/pollen.git commit 0afdf5d7fb4f4d8d0b3f1320b5a22106936648ca Author: Dralagen <dralagen@dralagen.fr> Date: Wed Oct 22 17:59:44 2014 +0200 Improve list of voteCounting, no depend of voteCounting id --- .../services/service/VoteCountingTypeService.java | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/service/VoteCountingTypeService.java b/pollen-services/src/main/java/org/chorem/pollen/services/service/VoteCountingTypeService.java index 554ba2c..7425b84 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/service/VoteCountingTypeService.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/service/VoteCountingTypeService.java @@ -28,6 +28,7 @@ import org.chorem.pollen.votecounting.VoteCountingNotFound; import org.chorem.pollen.votecounting.VoteCountingStrategy; import java.util.ArrayList; +import java.util.Iterator; import java.util.List; import java.util.Locale; @@ -40,21 +41,15 @@ import java.util.Locale; public class VoteCountingTypeService extends PollenServiceSupport { public List<VoteCountingTypeBean> getVoteCountingTypes() { + + VoteCountingFactory factory = serviceContext.getVoteCountingFactory(); + List<VoteCountingTypeBean> voteCountingTypes = new ArrayList<VoteCountingTypeBean>(); - try { - int i = 1; - while ( i > 0 ) { + for ( VoteCounting voteCounting : factory ) { - voteCountingTypes.add(idToVoteCountingType(i)); + voteCountingTypes.add(idToVoteCountingType(voteCounting.getId())); - ++i; - } - } - catch (VoteCountingNotFound e) { - if (voteCountingTypes.size() == 0) { - throw e; - } } return voteCountingTypes; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm