--- a/test/jdk/java/net/httpclient/HttpServerAdapters.java Thu Feb 15 16:32:53 2018 +0000
+++ b/test/jdk/java/net/httpclient/HttpServerAdapters.java Thu Feb 15 19:11:34 2018 +0000
@@ -213,7 +213,7 @@
@Override
public void sendResponseHeaders(int code, int contentLength) throws IOException {
if (contentLength == 0) contentLength = -1;
- if (contentLength < 0) contentLength = 0;
+ else if (contentLength < 0) contentLength = 0;
exchange.sendResponseHeaders(code, contentLength);
}
@Override
@@ -259,7 +259,7 @@
@Override
public void sendResponseHeaders(int code, int contentLength) throws IOException {
if (contentLength == 0) contentLength = -1;
- if (contentLength < 0) contentLength = 0;
+ else if (contentLength < 0) contentLength = 0;
exchange.sendResponseHeaders(code, contentLength);
}
void doFilter(Filter.Chain filter) throws IOException {