Added missing @deprecated javadoc tags; fixed style check violations

This commit is contained in:
Oleg Kalnichevski 2018-11-03 11:34:35 +01:00
parent e1a0227cfd
commit c04ffa17ce
19 changed files with 43 additions and 25 deletions

View File

@ -74,7 +74,7 @@ public class TestEhcacheHttpCacheStorage extends TestCase {
impl.putEntry(key, value);
verify(mockSerializer).writeTo(same(value), isA(OutputStream.class));
verify(mockCache).put(e);;
verify(mockCache).put(e);
}
@Test

View File

@ -14,7 +14,7 @@
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# under the License.
#
proxyconfigurator.name = Apache HTTP Components Proxy Configurator

View File

@ -305,6 +305,9 @@ public class WindowsNegotiateScheme extends AuthSchemeBase {
return !continueNeeded;
}
/**
* @deprecated Use {@link #authenticate(Credentials, HttpRequest, HttpContext)}
*/
@Override
@Deprecated
public Header authenticate(

View File

@ -50,7 +50,6 @@ public interface ClientContext {
* Attribute name of a {@link org.apache.http.conn.scheme.Scheme}
* object that represents the actual protocol scheme registry.
*/
@Deprecated
public static final String SCHEME_REGISTRY = "http.scheme-registry";
/**
@ -101,10 +100,6 @@ public interface ClientContext {
*/
public static final String PROXY_AUTH_STATE = "http.auth.proxy-scope";
/**
* @deprecated (4.1) do not use
*/
@Deprecated
public static final String AUTH_SCHEME_PREF = "http.auth.scheme-pref";
/**

View File

@ -43,6 +43,9 @@ import org.apache.http.auth.Credentials;
import org.apache.http.protocol.HttpContext;
import org.apache.http.util.Asserts;
/**
* @deprecated Do not use.
*/
@Deprecated
abstract class RequestAuthenticationBase implements HttpRequestInterceptor {

View File

@ -40,7 +40,7 @@ import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.util.EntityUtils;
/**
* @since 4.3
* @deprecated Do not use.
*/
@Deprecated
class CloseableHttpResponseProxy implements InvocationHandler {

View File

@ -128,7 +128,7 @@ import org.apache.http.util.EntityUtils;
*
* @since 4.0
*
* @deprecated (4.3)
* @deprecated Do not use.
*/
@Deprecated
public class DefaultRequestDirector implements RequestDirector {
@ -157,21 +157,18 @@ public class DefaultRequestDirector implements RequestDirector {
protected final HttpRequestRetryHandler retryHandler;
/** The redirect handler. */
@Deprecated
protected final RedirectHandler redirectHandler;
/** The redirect strategy. */
protected final RedirectStrategy redirectStrategy;
/** The target authentication handler. */
@Deprecated
protected final AuthenticationHandler targetAuthHandler;
/** The target authentication handler. */
protected final AuthenticationStrategy targetAuthStrategy;
/** The proxy authentication handler. */
@Deprecated
protected final AuthenticationHandler proxyAuthHandler;
/** The proxy authentication handler. */
@ -200,7 +197,6 @@ public class DefaultRequestDirector implements RequestDirector {
private HttpHost virtualHost;
@Deprecated
public DefaultRequestDirector(
final HttpRequestExecutor requestExec,
final ClientConnectionManager conman,
@ -224,7 +220,6 @@ public class DefaultRequestDirector implements RequestDirector {
}
@Deprecated
public DefaultRequestDirector(
final Log log,
final HttpRequestExecutor requestExec,

View File

@ -55,7 +55,7 @@ public class BestMatchSpecFactory implements CookieSpecFactory, CookieSpecProvid
public BestMatchSpecFactory(final String[] datepatterns, final boolean oneHeader) {
super();
this.cookieSpec = new BestMatchSpec(datepatterns, oneHeader);;
this.cookieSpec = new BestMatchSpec(datepatterns, oneHeader);
}
public BestMatchSpecFactory() {

View File

@ -50,6 +50,9 @@ public abstract class AbstractExecutionAwareRequest extends AbstractHttpMessage
this.cancellableRef = new AtomicReference<Cancellable>(null);
}
/**
* @deprecated Use {@link #setCancellable(Cancellable)}
*/
@Override
@Deprecated
public void setConnectionRequest(final ClientConnectionRequest connRequest) {
@ -64,6 +67,9 @@ public abstract class AbstractExecutionAwareRequest extends AbstractHttpMessage
});
}
/**
* @deprecated Use {@link #setCancellable(Cancellable)}
*/
@Override
@Deprecated
public void setReleaseTrigger(final ConnectionReleaseTrigger releaseTrigger) {

View File

@ -72,6 +72,7 @@ public class URLEncodedUtils {
/**
* @deprecated 4.5 Use {@link #parse(URI, Charset)}
*/
@Deprecated
public static List <NameValuePair> parse(final URI uri, final String charsetName) {
return parse(uri, charsetName != null ? Charset.forName(charsetName) : null);
}

View File

@ -37,6 +37,9 @@ import org.apache.http.conn.ConnectTimeoutException;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpParams;
/**
* @deprecated Do not use.
*/
@Deprecated
class SocketFactoryAdaptor implements SocketFactory {

View File

@ -142,14 +142,23 @@ public class SSLConnectionSocketFactory implements LayeredConnectionSocketFactor
public static final String SSL = "SSL";
public static final String SSLV2 = "SSLv2";
/**
* @deprecated Use {@link AllowAllHostnameVerifier#INSTANCE}.
*/
@Deprecated
public static final X509HostnameVerifier ALLOW_ALL_HOSTNAME_VERIFIER
= AllowAllHostnameVerifier.INSTANCE;
/**
* @deprecated Use {@link BrowserCompatHostnameVerifier#INSTANCE}.
*/
@Deprecated
public static final X509HostnameVerifier BROWSER_COMPATIBLE_HOSTNAME_VERIFIER
= BrowserCompatHostnameVerifier.INSTANCE;
/**
* @deprecated Use {@link StrictHostnameVerifier#INSTANCE}.
*/
@Deprecated
public static final X509HostnameVerifier STRICT_HOSTNAME_VERIFIER
= StrictHostnameVerifier.INSTANCE;

View File

@ -27,20 +27,20 @@
package org.apache.http.impl.auth;
import java.nio.charset.Charset;
import org.apache.http.Consts;
import java.security.Key;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.cert.Certificate;
import java.security.cert.CertificateEncodingException;
import java.util.Arrays;
import java.util.Locale;
import java.util.Random;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateEncodingException;
import java.security.cert.Certificate;
import org.apache.commons.codec.binary.Base64;
import org.apache.http.Consts;
/**
* Provides an implementation for NTLMv1, NTLMv2, and NTLM2 Session forms of the NTLM
@ -289,6 +289,9 @@ final class NTLMEngineImpl implements NTLMEngine {
protected byte[] ntlm2SessionResponseUserSessionKey = null;
protected byte[] lanManagerSessionKey = null;
/**
* @deprecated Use {@link CipherGen#CipherGen(Random, long, String, String, String, byte[], String, byte[], byte[], byte[], byte[], byte[])}
*/
@Deprecated
public CipherGen(final String domain, final String user, final String password,
final byte[] challenge, final String target, final byte[] targetInformation,
@ -320,6 +323,9 @@ final class NTLMEngineImpl implements NTLMEngine {
this.timestamp = timestamp;
}
/**
* @deprecated Use {@link CipherGen#CipherGen(Random, long, String, String, String, byte[], String, byte[], byte[], byte[], byte[], byte[])}
*/
@Deprecated
public CipherGen(final String domain,
final String user,

View File

@ -189,13 +189,11 @@ class HttpResponseProxy implements CloseableHttpResponse {
}
@Override
@Deprecated
public HttpParams getParams() {
return original.getParams();
}
@Override
@Deprecated
public void setParams(final HttpParams params) {
original.setParams(params);
}

View File

@ -127,7 +127,6 @@ class RequestEntityProxy implements HttpEntity {
}
@Override
@Deprecated
public void consumeContent() throws IOException {
consumed = true;
original.consumeContent();

View File

@ -87,7 +87,6 @@ class ResponseEntityProxy extends HttpEntityWrapper implements EofSensorWatcher
return new EofSensorInputStream(this.wrappedEntity.getContent(), this);
}
@Deprecated
@Override
public void consumeContent() throws IOException {
releaseConnection();

View File

@ -40,6 +40,8 @@ import org.junit.Test;
/**
* Unit tests for deprecated {@link X509HostnameVerifier} implementations.
*
* @deprecated Tests deprecated code.
*/
@Deprecated
public class TestHostnameVerifier {

View File

@ -61,7 +61,6 @@ public class TestRFC2617Scheme {
}
@Override
@Deprecated
public Header authenticate(
final Credentials credentials,
final HttpRequest request) throws AuthenticationException {

View File

@ -14,7 +14,7 @@
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# under the License.
#
info.module = HttpMime
info.release = ${pom.version}