Avoid possible NPE
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@940062 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fd513425a1
commit
a5814c279c
|
@ -97,6 +97,8 @@ public class HttpTestUtils {
|
|||
InputStream i2 = e2.getContent();
|
||||
if (i1 == null && i2 == null)
|
||||
return true;
|
||||
if (i1 == null || i2 == null)
|
||||
return false; // avoid possible NPEs below
|
||||
int b1 = -1;
|
||||
while ((b1 = i1.read()) != -1) {
|
||||
if (b1 != i2.read())
|
||||
|
|
Loading…
Reference in New Issue