Prevent empty search

This commit is contained in:
M66B 2020-07-07 08:22:11 +02:00
parent 855f2dcb77
commit 18e912b6b0
1 changed files with 4 additions and 0 deletions

View File

@ -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) {