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>.