hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r753460 - /httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientCustomContext.java
Date Fri, 13 Mar 2009 22:35:53 GMT
Author: sebb
Date: Fri Mar 13 22:35:53 2009
New Revision: 753460

URL: http://svn.apache.org/viewvc?rev=753460&view=rev
Log:
Avoid possible NPE

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientCustomContext.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientCustomContext.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientCustomContext.java?rev=753460&r1=753459&r2=753460&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientCustomContext.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientCustomContext.java
Fri Mar 13 22:35:53 2009
@@ -83,7 +83,9 @@
         }
         
         // Consume response content
-        entity.consumeContent();
+        if (entity != null) {
+            entity.consumeContent();
+        }
         
         System.out.println("----------------------------------------");
 



Mime
View raw message