Prevent empty search

pull/183/head
M66B 5 years ago
parent 855f2dcb77
commit 18e912b6b0

@ -405,6 +405,8 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
true,
state.ifolder.getPermanentFlags(),
browsable.keywords);
if (terms == null)
return new Message[0];
SearchSequence ss = new SearchSequence(protocol);
Argument args = ss.generateSequence(terms, StandardCharsets.UTF_8.name());
@ -439,6 +441,8 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
false,
state.ifolder.getPermanentFlags(),
browsable.keywords);
if (terms == null)
return new Message[0];
return state.ifolder.search(terms);
}
} catch (MessagingException ex) {

Loading…
Cancel
Save