// The lowVal should never be
// SelectedMailbox.NO_SUCH_MESSAGE but we check for it
// just to be safe
if (lowVal != SelectedMailbox.NO_SUCH_MESSAGE) {
if (highVal != Long.MAX_VALUE) {
highVal = selected.uid((int) highVal);
if (highVal == SelectedMailbox.NO_SUCH_MESSAGE) {
// we requested a message with a MSN higher
// then
// the current msg count. So just use the
// highest uid as max