LOG.debug("Fetching " + count + " messages. Total " + messages.length + " messages.");
}
for (int i = 0; i < count; i++) {
Message message = messages[i];
if (!message.getFlags().contains(Flags.Flag.DELETED)) {
<BUG>MailExchange exchange = endpoint.createExchange(message);
answer.add(exchange);</BUG>
} else {
if (LOG.isDebugEnabled()) {
LOG.debug("Skipping message as it was flagged as deleted: " + MailUtils.dumpMessage(message));

LOG.debug("Fetching " + count + " messages. Total " + messages.length + " messages.");
}
for (int i = 0; i < count; i++) {
Message message = messages[i];
if (!message.getFlags().contains(Flags.Flag.DELETED)) {
Exchange exchange = endpoint.createExchange(message);
answer.add(exchange);
} else {
if (LOG.isDebugEnabled()) {
LOG.debug("Skipping message as it was flagged as deleted: " + MailUtils.dumpMessage(message));
