nutch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrzej Bialecki ...@getopt.org>
Subject Re: Bug in DeleteDuplicates.java ?
Date Fri, 30 Dec 2005 08:23:02 GMT
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 is zero?
>  
>

Ka-boom! ;-) You're right, this should be wrapped in an IOException and 
rethrown.

-- 
Best regards,
Andrzej Bialecki     <><
 ___. ___ ___ ___ _ _   __________________________________
[__ || __|__/|__||\/|  Information Retrieval, Semantic Web
___|||__||  \|  ||  |  Embedded Unix, System Integration
http://www.sigram.com  Contact: info at sigram dot com



Mime
View raw message