Author: ab Date: Thu Jan 26 15:48:14 2006 New Revision: 372664 URL: http://svn.apache.org/viewcvs?rev=372664&view=rev Log: Fix for NUTCH-190 (ParseUtil drops reason for failed parse).
Also, hide the message about successful parse behind LOG.fine() - no message is a good message; if users want this they can still have it. Modified: lucene/nutch/trunk/src/java/org/apache/nutch/parse/ParseUtil.java Modified: lucene/nutch/trunk/src/java/org/apache/nutch/parse/ParseUtil.java URL: http://svn.apache.org/viewcvs/lucene/nutch/trunk/src/java/org/apache/nutch/parse/ParseUtil.java?rev=372664&r1=372663&r2=372664&view=diff ============================================================================== --- lucene/nutch/trunk/src/java/org/apache/nutch/parse/ParseUtil.java (original) +++ lucene/nutch/trunk/src/java/org/apache/nutch/parse/ParseUtil.java Thu Jan 26 15:48:14 2006 @@ -64,7 +64,7 @@ Parse parse = null; for (int i=0; i<parsers.length; i++) { - LOG.info("Parsing [" + content.getUrl() + "] with [" + parsers[i] + "]"); + LOG.fine("Parsing [" + content.getUrl() + "] with [" + parsers[i] + "]"); parse = parsers[i].getParse(content); if ((parse != null) && (parse.getData().getStatus().isSuccess())) { return parse; @@ -74,7 +74,8 @@ LOG.warning("Unable to successfully parse content " + content.getUrl() + " of type " + content.getContentType()); - return new ParseStatus().getEmptyParse(); + ParseStatus ps = (parse.getData() != null) ? parse.getData().getStatus() : null; + return (ps == null) ? new ParseStatus().getEmptyParse() : ps.getEmptyParse(); } /**