class QueryIterator extends Mailbox.Iterator.Wrapper {
Query q;
public QueryIterator(Query q, Mailbox m) { super(m.iterator()); this.q = q; }
- public boolean next() { do { if (!super.next()) return false; } while(!q.match(this)); return true; }
+ public boolean next() {
+ if (q == null) return false;
+ do { if (!super.next()) return false; } while(!q.match(this)); return true; }
}
}