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 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Nutch-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nutch-developers
