Re: Bug in DeleteDuplicates.java ?

2006-01-02 Thread Doug Cutting
Andrzej Bialecki wrote: Gal Nitzan wrote: this function throws IOException. Why? public long getPos() throws IOException { return (doc*INDEX_LENGTH)/maxDoc; } It should be throwing ArithmeticException The IOException is required by the API of RecordReader. W

Re: Bug in DeleteDuplicates.java ?

2005-12-30 Thread Andrzej Bialecki
Gal Nitzan wrote: this function throws IOException. Why? public long getPos() throws IOException { return (doc*INDEX_LENGTH)/maxDoc; } It should be throwing ArithmeticException The IOException is required by the API of RecordReader. What happens when maxDoc

Bug in DeleteDuplicates.java ?

2005-12-29 Thread Gal Nitzan
this function throws IOException. Why? public long getPos() throws IOException { return (doc*INDEX_LENGTH)/maxDoc; } It should be throwing ArithmeticException What happens when maxDoc is zero? Gal