MailFolder referenceFolder = getMailbox(referenceRoot, session, false);
if (referenceFolder == null) {
referenceFolder = getMailbox("", session, true);
removeUserPrefix = true;
}
<BUG>mailboxes = new ArrayList<MailFolder>(1);
mailboxes.add(referenceFolder);</BUG>
} else {
String searchPattern;
if (mailboxPattern.charAt(0) == NAMESPACE_PREFIX_CHAR) {

MailFolder referenceFolder = getMailbox(referenceRoot, session, false);
if (referenceFolder == null) {
referenceFolder = getMailbox("", session, true);
removeUserPrefix = true;
}
mailboxes = new ArrayList<>(1);
mailboxes.add(referenceFolder);
} else {
String searchPattern;
if (mailboxPattern.charAt(0) == NAMESPACE_PREFIX_CHAR) {
