Fix up IDE warnings
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1571442 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2dea804f67
commit
c79ccfe755
|
@ -34,7 +34,7 @@ import org.junit.Before;
|
|||
import org.junit.Test;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
@SuppressWarnings("boxing") // test code
|
||||
@SuppressWarnings({"boxing","static-access"}) // test code
|
||||
public class TestEofSensorInputStream {
|
||||
|
||||
private InputStream instream;
|
||||
|
|
|
@ -46,7 +46,7 @@ import org.mockito.Mockito;
|
|||
/**
|
||||
* Simple tests for {@link CloseableHttpClient}.
|
||||
*/
|
||||
@SuppressWarnings("boxing") // test code
|
||||
@SuppressWarnings({"boxing","static-access"}) // test code
|
||||
public class TestCloseableHttpClient {
|
||||
|
||||
static abstract class NoopCloseableHttpClient extends CloseableHttpClient {
|
||||
|
|
|
@ -42,7 +42,6 @@ import org.junit.Before;
|
|||
import org.junit.Test;
|
||||
|
||||
|
||||
@SuppressWarnings("boxing") // test code
|
||||
public class TestDefaultBackoffStrategy {
|
||||
|
||||
private DefaultBackoffStrategy impl;
|
||||
|
|
|
@ -55,7 +55,7 @@ import org.mockito.Mockito;
|
|||
/**
|
||||
* Simple tests for {@link InternalHttpClient}.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@SuppressWarnings({"static-access"}) // test code
|
||||
public class TestInternalHttpClient {
|
||||
|
||||
private ClientExecChain execChain;
|
||||
|
|
|
@ -64,6 +64,7 @@ import org.mockito.Mockito;
|
|||
/**
|
||||
* Tests for Abort handling.
|
||||
*/
|
||||
@SuppressWarnings("static-access") // test code
|
||||
public class TestAbortHandling extends IntegrationTestBase {
|
||||
|
||||
@Before
|
||||
|
@ -497,14 +498,14 @@ public class TestAbortHandling extends IntegrationTestBase {
|
|||
final HttpHost host,
|
||||
final InetSocketAddress localAddress,
|
||||
final int connectTimeout,
|
||||
final HttpContext context) throws IOException {
|
||||
final HttpContext context) {
|
||||
throw new UnsupportedOperationException("just a mockup");
|
||||
}
|
||||
|
||||
public void upgrade(
|
||||
final HttpClientConnection conn,
|
||||
final HttpHost host,
|
||||
final HttpContext context) throws IOException {
|
||||
final HttpContext context) {
|
||||
throw new UnsupportedOperationException("just a mockup");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
package org.apache.http.impl.client.integration;
|
||||
|
||||
import junit.framework.Assert;
|
||||
|
||||
import org.apache.http.HttpHost;
|
||||
import org.apache.http.client.methods.CloseableHttpResponse;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
|
@ -43,6 +44,7 @@ import java.net.InetSocketAddress;
|
|||
|
||||
public class TestBasicConnectionManager extends IntegrationTestBase {
|
||||
|
||||
@SuppressWarnings("resource") // BasicHttpClientConnectionManager
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
this.localServer = new LocalTestServer(null, null);
|
||||
|
|
|
@ -54,7 +54,7 @@ import org.mockito.Mock;
|
|||
import org.mockito.Mockito;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
|
||||
@SuppressWarnings("boxing") // test code
|
||||
@SuppressWarnings({"boxing","static-access"}) // test code
|
||||
public class TestBasicHttpClientConnectionManager {
|
||||
|
||||
@Mock
|
||||
|
|
|
@ -45,7 +45,7 @@ import org.mockito.Mockito;
|
|||
/**
|
||||
* Tests for {@link DefaultRoutePlanner}.
|
||||
*/
|
||||
@SuppressWarnings("boxing") // test code
|
||||
@SuppressWarnings({"boxing","static-access"}) // test code
|
||||
public class TestDefaultRoutePlanner {
|
||||
|
||||
private SchemePortResolver schemePortResolver;
|
||||
|
|
|
@ -50,7 +50,7 @@ import org.junit.Before;
|
|||
import org.junit.Test;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
@SuppressWarnings("boxing") // test code
|
||||
@SuppressWarnings({"boxing","static-access"}) // test code
|
||||
public class TestHttpClientConnectionOperator {
|
||||
|
||||
private ManagedHttpClientConnection conn;
|
||||
|
|
|
@ -37,6 +37,7 @@ import org.junit.Before;
|
|||
import org.junit.Test;
|
||||
import org.mockito.Mockito;
|
||||
|
||||
@SuppressWarnings({"static-access"}) // test code
|
||||
public class TestConnectionHolder {
|
||||
|
||||
private Log log;
|
||||
|
|
|
@ -91,7 +91,7 @@ import org.mockito.MockitoAnnotations;
|
|||
import org.mockito.invocation.InvocationOnMock;
|
||||
import org.mockito.stubbing.Answer;
|
||||
|
||||
@SuppressWarnings("boxing") // test code
|
||||
@SuppressWarnings({"boxing","static-access"}) // test code
|
||||
public class TestMainClientExec {
|
||||
|
||||
@Mock
|
||||
|
|
|
@ -66,7 +66,7 @@ import java.lang.reflect.Proxy;
|
|||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@SuppressWarnings("boxing") // test code
|
||||
@SuppressWarnings({"boxing","static-access"}) // test code
|
||||
public class TestMinimalClientExec {
|
||||
|
||||
@Mock
|
||||
|
|
|
@ -50,6 +50,7 @@ import org.mockito.MockitoAnnotations;
|
|||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
|
||||
@SuppressWarnings({"static-access"}) // test code
|
||||
public class TestProtocolExec {
|
||||
|
||||
@Mock
|
||||
|
|
|
@ -65,7 +65,7 @@ import java.io.ByteArrayInputStream;
|
|||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("boxing") // test code
|
||||
@SuppressWarnings({"boxing","static-access"}) // test code
|
||||
public class TestRedirectExec {
|
||||
|
||||
@Mock
|
||||
|
|
|
@ -53,7 +53,7 @@ import java.io.ByteArrayInputStream;
|
|||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
@SuppressWarnings({"boxing","static-access","resource"}) // test code
|
||||
@SuppressWarnings({"boxing","static-access"}) // test code
|
||||
public class TestRetryExec {
|
||||
|
||||
@Mock
|
||||
|
|
|
@ -42,7 +42,7 @@ import org.mockito.Mock;
|
|||
import org.mockito.Mockito;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
|
||||
@SuppressWarnings("boxing") // test code
|
||||
@SuppressWarnings({"boxing","static-access"}) // test code
|
||||
public class TestServiceUnavailableRetryExec {
|
||||
|
||||
@Mock
|
||||
|
|
|
@ -146,6 +146,7 @@ public class TestMultipartForm {
|
|||
final FormBodyPart p1 = new FormBodyPart(
|
||||
"field1",
|
||||
new FileBody(tmpfile));
|
||||
@SuppressWarnings("resource")
|
||||
final FormBodyPart p2 = new FormBodyPart(
|
||||
"field2",
|
||||
new InputStreamBody(new FileInputStream(tmpfile), "file.tmp"));
|
||||
|
@ -193,6 +194,7 @@ public class TestMultipartForm {
|
|||
final FormBodyPart p2 = new FormBodyPart(
|
||||
"field2",
|
||||
new FileBody(tmpfile, ContentType.create("text/plain", "ANSI_X3.4-1968"), "test-file"));
|
||||
@SuppressWarnings("resource")
|
||||
final FormBodyPart p3 = new FormBodyPart(
|
||||
"field3",
|
||||
new InputStreamBody(new FileInputStream(tmpfile), "file.tmp"));
|
||||
|
@ -247,6 +249,7 @@ public class TestMultipartForm {
|
|||
final FormBodyPart p2 = new FormBodyPart(
|
||||
"field2",
|
||||
new FileBody(tmpfile, ContentType.create("text/plain", "ANSI_X3.4-1968"), "test-file"));
|
||||
@SuppressWarnings("resource")
|
||||
final FormBodyPart p3 = new FormBodyPart(
|
||||
"field3",
|
||||
new InputStreamBody(new FileInputStream(tmpfile), "file.tmp"));
|
||||
|
@ -317,9 +320,11 @@ public class TestMultipartForm {
|
|||
writer.close();
|
||||
}
|
||||
|
||||
@SuppressWarnings("resource")
|
||||
final FormBodyPart p1 = new FormBodyPart(
|
||||
"field1",
|
||||
new InputStreamBody(new FileInputStream(tmpfile), s1 + ".tmp"));
|
||||
@SuppressWarnings("resource")
|
||||
final FormBodyPart p2 = new FormBodyPart(
|
||||
"field2",
|
||||
new InputStreamBody(new FileInputStream(tmpfile), s2 + ".tmp"));
|
||||
|
|
Loading…
Reference in New Issue