compute proposals for blank strings

Before we would only provide proposals for empty strings.
But blank and empty is not that different.
This commit is contained in:
2017-04-20 19:05:21 +02:00
parent fb40139d75
commit 87858a79c1
2 changed files with 8 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ import java.util.Map.Entry;
import java.util.SortedSet;
import java.util.TreeSet;
import org.apache.commons.lang3.StringUtils;
import org.lucares.pdb.datastore.Proposal;
import org.lucares.pdb.datastore.lang.ProposerParser;
import org.lucares.utils.CollectionUtils;
@@ -21,7 +22,7 @@ public class Proposer {
public List<Proposal> propose(final String query, final int caretIndex) {
final SortedSet<Proposal> result;
if (query.isEmpty()) {
if (StringUtils.isBlank(query)) {
result = proposeForAllKeys();
} else {
result = ProposerParser.parse(query, dataStore, caretIndex);