This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen_1.x. See https://gitlab.nuiton.org/None/pollen_1.x.git commit deec9cef812aa952c0619b7162c69d7b5bb065d6 Author: Kevin Morin <morin@codelutin.com> Date: Fri Feb 24 17:52:27 2017 +0100 fixes #1385 The poll administration links do not work anymore --- .../main/java/org/chorem/pollen/business/persistence/PollImpl.java | 2 +- .../src/main/java/org/chorem/pollen/business/persistence/Polls.java | 5 +++++ pollen-services/src/main/java/org/chorem/pollen/bean/PollUri.java | 5 +++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/PollImpl.java b/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/PollImpl.java index 8975c4e..8cf622f 100644 --- a/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/PollImpl.java +++ b/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/PollImpl.java @@ -116,7 +116,7 @@ public class PollImpl extends PollAbstract { public String getVoteId(PollAccount account) { String voteId = getPollId(); if (account != null) { - voteId += ":" + account.getAccountId(); + voteId += Polls.ID_SEPARATOR + account.getAccountId(); } return voteId; } diff --git a/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/Polls.java b/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/Polls.java index 360e7f4..7e20e51 100644 --- a/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/Polls.java +++ b/pollen-persistence/src/main/java/org/chorem/pollen/business/persistence/Polls.java @@ -46,6 +46,11 @@ import java.util.Set; public class Polls { /** + * Character to separate the ids (eg vote id vs user id) + */ + public static final String ID_SEPARATOR = "_"; + + /** * Collect all vote for all voters of the givne poll. * <p/> * The result (a set of simple voters) are stored in a fictiv group of voter. diff --git a/pollen-services/src/main/java/org/chorem/pollen/bean/PollUri.java b/pollen-services/src/main/java/org/chorem/pollen/bean/PollUri.java index 781489d..8e75539 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/bean/PollUri.java +++ b/pollen-services/src/main/java/org/chorem/pollen/bean/PollUri.java @@ -24,6 +24,7 @@ package org.chorem.pollen.bean; import com.google.common.base.Preconditions; import org.apache.commons.lang3.StringUtils; +import org.chorem.pollen.business.persistence.Polls; import java.io.Serializable; @@ -41,7 +42,7 @@ public class PollUri implements Serializable { PollUri result = new PollUri(); - String[] split = uri.split(":", 2); + String[] split = uri.split(Polls.ID_SEPARATOR, 2); if (split.length > 0) { result.setPollId(split[0]); if (split.length > 1) { @@ -95,7 +96,7 @@ public class PollUri implements Serializable { public String getUri() { String result = pollId; if (StringUtils.isNotEmpty(accountId)) { - result += ":" + accountId; + result += Polls.ID_SEPARATOR + accountId; } return result; } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.