You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by ab...@apache.org on 2010/09/17 16:48:59 UTC

svn commit: r998158 - in /nutch/branches/branch-1.3: CHANGES.txt src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/HttpResponse.java

Author: ab
Date: Fri Sep 17 14:48:59 2010
New Revision: 998158

URL: http://svn.apache.org/viewvc?rev=998158&view=rev
Log:
NUTCH-862 HttpClient null pointer exception.

Modified:
    nutch/branches/branch-1.3/CHANGES.txt
    nutch/branches/branch-1.3/src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/HttpResponse.java

Modified: nutch/branches/branch-1.3/CHANGES.txt
URL: http://svn.apache.org/viewvc/nutch/branches/branch-1.3/CHANGES.txt?rev=998158&r1=998157&r2=998158&view=diff
==============================================================================
--- nutch/branches/branch-1.3/CHANGES.txt (original)
+++ nutch/branches/branch-1.3/CHANGES.txt Fri Sep 17 14:48:59 2010
@@ -2,6 +2,8 @@ Nutch Change Log
 
 Release 1.3 - Current Development
 
+* NUTCH-862 HttpClient null pointer exception (Sebastian Nagel via ab)
+
 * NUTCH-870 Injector should add the metadata before calling injectedScore (jnioche via mattmann)
 
 * NUTCH-869 Add parse-html back (jnioche)

Modified: nutch/branches/branch-1.3/src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/HttpResponse.java
URL: http://svn.apache.org/viewvc/nutch/branches/branch-1.3/src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/HttpResponse.java?rev=998158&r1=998157&r2=998158&view=diff
==============================================================================
--- nutch/branches/branch-1.3/src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/HttpResponse.java (original)
+++ nutch/branches/branch-1.3/src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/HttpResponse.java Fri Sep 17 14:48:59 2010
@@ -134,7 +134,9 @@ public class HttpResponse implements Res
         if (code == 200) throw new IOException(e.toString());
         // for codes other than 200 OK, we are fine with empty content
       } finally {
-        in.close();
+        if (in != null) {
+          in.close();
+        }
         get.abort();
       }