From 6a7ed064c4e986b1c32fe01577e44f49f955b2ea Mon Sep 17 00:00:00 2001 From: Arimihanta Date: Thu, 15 Jul 2021 04:33:55 +0300 Subject: [PATCH] =?UTF-8?q?Regler=20probl=C3=A8me=20m=C3=AAme=20vote=20sur?= =?UTF-8?q?=20vote=20majoritaire?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lirmm/aren/ws/rest/VMThemeRESTFacade.java | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/main/java/fr/lirmm/aren/ws/rest/VMThemeRESTFacade.java b/src/main/java/fr/lirmm/aren/ws/rest/VMThemeRESTFacade.java index 3f84c24..414e2e1 100644 --- a/src/main/java/fr/lirmm/aren/ws/rest/VMThemeRESTFacade.java +++ b/src/main/java/fr/lirmm/aren/ws/rest/VMThemeRESTFacade.java @@ -106,7 +106,7 @@ public class VMThemeRESTFacade extends AbstractRESTFacade{ choicesNotVoted.add(choice) ; } } - VMChoice newChoices[]=new VMChoice[choices.length] ; + HashSet newChoices = new HashSet<>(); if(!proposalTallyInterfaces.isEmpty()){ ProposalTallyInterface []proposalTallyInterfacesArray=new ProposalTallyInterface[proposalTallyInterfaces.size()] ; for(int i=0 ; i{ for(ProposalResultInterface item : result.getProposalResults()){ VMChoice vmChoice=(VMChoice) choices[index] ; vmChoice.setRank(item.getRank()); - newChoices[item.getRank()-1]=vmChoice ; - System.out.println(item.getRank()+" - "+newChoices[item.getRank()-1].getTitle()); + newChoices.add(vmChoice) ; index++ ; } } for(int i=0 ; i setChoices = new HashSet<>(); - System.out.println("Rang : ") ; - for(int i=0 ; i