No need to explicitly declare an array when calling a vararg method.
This commit is contained in:
parent
2e54182cdd
commit
80ec981895
|
@ -68,12 +68,11 @@ public abstract class AbstractAuthenticationHandler implements AuthenticationHan
|
|||
private final Log log = LogFactory.getLog(getClass());
|
||||
|
||||
private static final List<String> DEFAULT_SCHEME_PRIORITY =
|
||||
Collections.unmodifiableList(Arrays.asList(new String[] {
|
||||
Collections.unmodifiableList(Arrays.asList(
|
||||
AuthPolicy.SPNEGO,
|
||||
AuthPolicy.NTLM,
|
||||
AuthPolicy.DIGEST,
|
||||
AuthPolicy.BASIC
|
||||
}));
|
||||
AuthPolicy.BASIC));
|
||||
|
||||
public AbstractAuthenticationHandler() {
|
||||
super();
|
||||
|
|
|
@ -50,7 +50,7 @@ class CloseableHttpResponseProxy implements InvocationHandler {
|
|||
static {
|
||||
try {
|
||||
CONSTRUCTOR = Proxy.getProxyClass(CloseableHttpResponseProxy.class.getClassLoader(),
|
||||
new Class<?>[] { CloseableHttpResponse.class }).getConstructor(new Class[] { InvocationHandler.class });
|
||||
CloseableHttpResponse.class).getConstructor(InvocationHandler.class);
|
||||
} catch (final NoSuchMethodException ex) {
|
||||
throw new IllegalStateException(ex);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,6 @@ import java.util.concurrent.atomic.AtomicReference;
|
|||
import org.apache.http.HttpClientConnection;
|
||||
import org.apache.http.HttpHost;
|
||||
import org.apache.http.HttpRequest;
|
||||
import org.apache.http.HttpRequestInterceptor;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.HttpStatus;
|
||||
import org.apache.http.HttpVersion;
|
||||
|
@ -114,7 +113,7 @@ public class TestConnectionManagement extends LocalServerTestBase {
|
|||
context.setAttribute(HttpCoreContext.HTTP_TARGET_HOST, target);
|
||||
|
||||
final HttpProcessor httpProcessor = new ImmutableHttpProcessor(
|
||||
new HttpRequestInterceptor[] { new RequestContent(), new RequestConnControl() });
|
||||
new RequestContent(), new RequestConnControl());
|
||||
|
||||
final HttpRequestExecutor exec = new HttpRequestExecutor();
|
||||
exec.preProcess(request, httpProcessor, context);
|
||||
|
@ -203,7 +202,7 @@ public class TestConnectionManagement extends LocalServerTestBase {
|
|||
context.setAttribute(HttpCoreContext.HTTP_TARGET_HOST, target);
|
||||
|
||||
final HttpProcessor httpProcessor = new ImmutableHttpProcessor(
|
||||
new HttpRequestInterceptor[] { new RequestContent(), new RequestConnControl() });
|
||||
new RequestContent(), new RequestConnControl());
|
||||
|
||||
final HttpRequestExecutor exec = new HttpRequestExecutor();
|
||||
exec.preProcess(request, httpProcessor, context);
|
||||
|
@ -401,7 +400,7 @@ public class TestConnectionManagement extends LocalServerTestBase {
|
|||
context.setAttribute(HttpCoreContext.HTTP_TARGET_HOST, target);
|
||||
|
||||
final HttpProcessor httpProcessor = new ImmutableHttpProcessor(
|
||||
new HttpRequestInterceptor[] { new RequestContent(), new RequestConnControl() });
|
||||
new RequestContent(), new RequestConnControl());
|
||||
|
||||
final HttpRequestExecutor exec = new HttpRequestExecutor();
|
||||
exec.preProcess(request, httpProcessor, context);
|
||||
|
|
Loading…
Reference in New Issue