Fix Conjunction.addOperator to do nothing if term is empty

prevent to result in query string with repeated logical operator
like "field:term AND AND field:term"
possibliy causing out of mem in postprocessing_doublecontent
pull/149/head
reger 7 years ago
parent b6a41df4f7
commit d03e2c98ea

@ -20,10 +20,17 @@ public abstract class AbstractOperations extends AbstractTerm implements Operati
return h;
}
/**
* Add the term with the defined logical operator.
* If length of term is empty nothing is changed
* @param term
*/
@Override
public void addOperand(Term term) {
if (term.toString().isEmpty()) {
this.terms.add(term);
}
}
/**
* As a Operations object is a collection of Terms, we must be able to show them

Loading…
Cancel
Save