--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/AuthenticationFilter.java Tue Nov 21 17:17:37 2017 +0300
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/AuthenticationFilter.java Tue Nov 21 16:39:20 2017 +0000
@@ -54,6 +54,9 @@
static final int UNAUTHORIZED = 401;
static final int PROXY_UNAUTHORIZED = 407;
+ // A public no-arg constructor is required by FilterFactory
+ public AuthenticationFilter() {}
+
private PasswordAuthentication getCredentials(String header,
boolean proxy,
HttpRequestImpl req)
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/FilterFactory.java Tue Nov 21 17:17:37 2017 +0300
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/FilterFactory.java Tue Nov 21 16:39:20 2017 +0000
@@ -40,8 +40,8 @@
List<HeaderFilter> l = new LinkedList<>();
for (Class<? extends HeaderFilter> clazz : filterClasses) {
try {
- @SuppressWarnings("deprecation")
- HeaderFilter headerFilter = clazz.newInstance();
+ // Requires a public no arg constructor.
+ HeaderFilter headerFilter = clazz.getConstructor().newInstance();
l.add(headerFilter);
} catch (ReflectiveOperationException e) {
throw new InternalError(e);
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpClientImpl.java Tue Nov 21 17:17:37 2017 +0300
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpClientImpl.java Tue Nov 21 16:39:20 2017 +0000
@@ -34,7 +34,6 @@
import java.net.CookieHandler;
import java.net.NetPermission;
import java.net.ProxySelector;
-import java.net.URI;
import java.nio.channels.CancelledKeyException;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.SelectableChannel;
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/RedirectFilter.java Tue Nov 21 17:17:37 2017 +0300
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/RedirectFilter.java Tue Nov 21 16:39:20 2017 +0000
@@ -44,6 +44,9 @@
"jdk.httpclient.redirects.retrylimit", DEFAULT_MAX_REDIRECTS
);
+ // A public no-arg constructor is required by FilterFactory
+ public RedirectFilter() {}
+
@Override
public synchronized void request(HttpRequestImpl r, MultiExchange<?,?> e) throws IOException {
this.request = r;