branch develop updated (10fdada -> 63a6644)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository bow. See http://git.chorem.org/bow.git from 10fdada [jgitflow-maven-plugin]Updating develop poms back to pre merge state new 63a6644 fixes #1261: Can use prefix that start with another existing prefix 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 63a664432b996bcf4fc057341cce4d1d1c82e6c6 Author: Benjamin POUSSIN <poussin@codelutin.com> Date: Wed Jul 15 22:46:48 2015 +0200 fixes #1261: Can use prefix that start with another existing prefix Summary of changes: .../org/chorem/bow/action/opensearch/OpenSearchBaseAction.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 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 bow. See http://git.chorem.org/bow.git commit 63a664432b996bcf4fc057341cce4d1d1c82e6c6 Author: Benjamin POUSSIN <poussin@codelutin.com> Date: Wed Jul 15 22:46:48 2015 +0200 fixes #1261: Can use prefix that start with another existing prefix --- .../org/chorem/bow/action/opensearch/OpenSearchBaseAction.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bow-ui/src/main/java/org/chorem/bow/action/opensearch/OpenSearchBaseAction.java b/bow-ui/src/main/java/org/chorem/bow/action/opensearch/OpenSearchBaseAction.java index 0b1e4f3..83a8b2f 100644 --- a/bow-ui/src/main/java/org/chorem/bow/action/opensearch/OpenSearchBaseAction.java +++ b/bow-ui/src/main/java/org/chorem/bow/action/opensearch/OpenSearchBaseAction.java @@ -26,6 +26,8 @@ import org.apache.commons.logging.LogFactory; import org.apache.struts2.ServletActionContext; import org.chorem.bow.BowSearchPrefix; import org.chorem.bow.action.BowBaseAction; +import java.util.List; +import java.util.ListIterator; /** * Traite toutes les demandes faite via l'opensearch @@ -78,7 +80,10 @@ abstract public class OpenSearchBaseAction extends BowBaseAction { BowSearchPrefix foundPrefix = null; String query; - for (BowSearchPrefix prefix : getBowSession().getSearchPrefix()) { + // prefixes is ordered in lexical order, iterate in reverse order to match per example !gi before !g + List<BowSearchPrefix> prefixes = getBowSession().getSearchPrefix(); + for (ListIterator<BowSearchPrefix> i=prefixes.listIterator(prefixes.size()); i.hasPrevious();) { + BowSearchPrefix prefix = i.previous(); String p = prefix.getPrefix(); if (StringUtils.isBlank(p)) { defaultPrefix = prefix; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm