From: <rb...@us...> - 2016-11-21 07:20:52
|
Revision: 13080 http://sourceforge.net/p/htmlunit/code/13080 Author: rbri Date: 2016-11-21 07:20:50 +0000 (Mon, 21 Nov 2016) Log Message: ----------- code cleanup Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java 2016-11-20 16:19:46 UTC (rev 13079) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/HttpWebConnection.java 2016-11-21 07:20:50 UTC (rev 13080) @@ -708,7 +708,7 @@ protected DownloadedContent downloadResponseBody(final HttpResponse httpResponse) throws IOException { final HttpEntity httpEntity = httpResponse.getEntity(); if (httpEntity == null) { - return new DownloadedContent.InMemory(new byte[] {}); + return new DownloadedContent.InMemory(null); } return downloadContent(httpEntity.getContent(), webClient_.getOptions().getMaxInMemory()); @@ -723,7 +723,7 @@ */ public static DownloadedContent downloadContent(final InputStream is, final int maxInMemory) throws IOException { if (is == null) { - return new DownloadedContent.InMemory(new byte[] {}); + return new DownloadedContent.InMemory(null); } final ByteArrayOutputStream bos = new ByteArrayOutputStream(); |