Add missing @Override markers
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@617233 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2cc2818642
commit
9b592fd961
|
@ -228,7 +228,8 @@ public class AuthScope {
|
|||
/**
|
||||
* @see java.lang.Object#equals(Object)
|
||||
*/
|
||||
public boolean equals(Object o) {
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == null) {
|
||||
return false;
|
||||
}
|
||||
|
@ -249,7 +250,8 @@ public class AuthScope {
|
|||
/**
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
public String toString() {
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
if (this.scheme != null) {
|
||||
buffer.append(this.scheme.toUpperCase());
|
||||
|
@ -276,7 +278,8 @@ public class AuthScope {
|
|||
/**
|
||||
* @see java.lang.Object#hashCode()
|
||||
*/
|
||||
public int hashCode() {
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = LangUtils.HASH_SEED;
|
||||
hash = LangUtils.hashCode(hash, this.host);
|
||||
hash = LangUtils.hashCode(hash, this.port);
|
||||
|
|
|
@ -130,7 +130,8 @@ public class UsernamePasswordCredentials implements Credentials {
|
|||
*
|
||||
* @return the username:password formed string
|
||||
*/
|
||||
public String toString() {
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuffer result = new StringBuffer();
|
||||
result.append(this.userName);
|
||||
result.append(":");
|
||||
|
@ -143,7 +144,8 @@ public class UsernamePasswordCredentials implements Credentials {
|
|||
*
|
||||
* @return The hash code including user name and password.
|
||||
*/
|
||||
public int hashCode() {
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = LangUtils.HASH_SEED;
|
||||
hash = LangUtils.hashCode(hash, this.userName);
|
||||
hash = LangUtils.hashCode(hash, this.password);
|
||||
|
@ -158,7 +160,8 @@ public class UsernamePasswordCredentials implements Credentials {
|
|||
*
|
||||
* @return <code>true</code> if the object is equivalent.
|
||||
*/
|
||||
public boolean equals(Object o) {
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (o == null) return false;
|
||||
if (this == o) return true;
|
||||
// note - to allow for sub-classing, this checks that class is the same
|
||||
|
|
|
@ -132,7 +132,8 @@ public class AuthState {
|
|||
}
|
||||
|
||||
|
||||
public String toString() {
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append("auth scope [");
|
||||
buffer.append(this.authScope);
|
||||
|
|
|
@ -73,7 +73,8 @@ public class HttpGet extends HttpRequestBase {
|
|||
setURI(new URI(uri));
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
@Override
|
||||
public String getMethod() {
|
||||
return METHOD_NAME;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,8 @@ public class HttpHead extends HttpRequestBase {
|
|||
setURI(new URI(uri));
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
@Override
|
||||
public String getMethod() {
|
||||
return METHOD_NAME;
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,8 @@ public class HttpOptions extends HttpRequestBase {
|
|||
setURI(new URI(uri));
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
@Override
|
||||
public String getMethod() {
|
||||
return METHOD_NAME;
|
||||
}
|
||||
|
||||
|
|
|
@ -77,7 +77,8 @@ public class HttpPost extends HttpEntityEnclosingRequestBase {
|
|||
setURI(new URI(uri));
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
@Override
|
||||
public String getMethod() {
|
||||
return METHOD_NAME;
|
||||
}
|
||||
|
||||
|
|
|
@ -69,7 +69,8 @@ public class HttpPut extends HttpEntityEnclosingRequestBase {
|
|||
setURI(new URI(uri));
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
@Override
|
||||
public String getMethod() {
|
||||
return METHOD_NAME;
|
||||
}
|
||||
|
||||
|
|
|
@ -72,7 +72,8 @@ public class HttpTrace extends HttpRequestBase {
|
|||
setURI(new URI(uri));
|
||||
}
|
||||
|
||||
public String getMethod() {
|
||||
@Override
|
||||
public String getMethod() {
|
||||
return METHOD_NAME;
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,8 @@ public class UrlEncodedFormEntity extends AbstractHttpEntity {
|
|||
return new ByteArrayInputStream(this.content);
|
||||
}
|
||||
|
||||
public Header getContentType() {
|
||||
@Override
|
||||
public Header getContentType() {
|
||||
return new BasicHeader(HTTP.CONTENT_TYPE, FORM_URL_ENCODED_CONTENT_TYPE);
|
||||
}
|
||||
|
||||
|
|
|
@ -86,20 +86,23 @@ public class BasicManagedEntity extends HttpEntityWrapper
|
|||
|
||||
|
||||
// non-javadoc, see interface HttpEntity
|
||||
public boolean isRepeatable() {
|
||||
@Override
|
||||
public boolean isRepeatable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// non-javadoc, see interface HttpEntity
|
||||
public InputStream getContent() throws IOException {
|
||||
@Override
|
||||
public InputStream getContent() throws IOException {
|
||||
|
||||
return new EofSensorInputStream(wrappedEntity.getContent(), this);
|
||||
}
|
||||
|
||||
|
||||
// non-javadoc, see interface HttpEntity
|
||||
public void consumeContent() throws IOException {
|
||||
@Override
|
||||
public void consumeContent() throws IOException {
|
||||
|
||||
if (managedConn == null)
|
||||
return;
|
||||
|
|
|
@ -131,7 +131,8 @@ public class EofSensorInputStream extends InputStream
|
|||
|
||||
|
||||
// non-javadoc, see base class InputStream
|
||||
public int read() throws IOException {
|
||||
@Override
|
||||
public int read() throws IOException {
|
||||
int l = -1;
|
||||
|
||||
if (isReadAllowed()) {
|
||||
|
@ -149,7 +150,8 @@ public class EofSensorInputStream extends InputStream
|
|||
|
||||
|
||||
// non-javadoc, see base class InputStream
|
||||
public int read(byte[] b, int off, int len) throws IOException {
|
||||
@Override
|
||||
public int read(byte[] b, int off, int len) throws IOException {
|
||||
int l = -1;
|
||||
|
||||
if (isReadAllowed()) {
|
||||
|
@ -167,7 +169,8 @@ public class EofSensorInputStream extends InputStream
|
|||
|
||||
|
||||
// non-javadoc, see base class InputStream
|
||||
public int read(byte[] b) throws IOException {
|
||||
@Override
|
||||
public int read(byte[] b) throws IOException {
|
||||
int l = -1;
|
||||
|
||||
if (isReadAllowed()) {
|
||||
|
@ -184,7 +187,8 @@ public class EofSensorInputStream extends InputStream
|
|||
|
||||
|
||||
// non-javadoc, see base class InputStream
|
||||
public int available() throws IOException {
|
||||
@Override
|
||||
public int available() throws IOException {
|
||||
int a = 0; // not -1
|
||||
|
||||
if (isReadAllowed()) {
|
||||
|
@ -202,7 +206,8 @@ public class EofSensorInputStream extends InputStream
|
|||
|
||||
|
||||
// non-javadoc, see base class InputStream
|
||||
public void close() throws IOException {
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
// tolerate multiple calls to close()
|
||||
selfClosed = true;
|
||||
checkClose();
|
||||
|
|
|
@ -157,7 +157,8 @@ public final class PlainSocketFactory implements SocketFactory {
|
|||
*
|
||||
* @return iff the argument is this object
|
||||
*/
|
||||
public boolean equals(Object obj) {
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return (obj == this);
|
||||
}
|
||||
|
||||
|
@ -166,7 +167,8 @@ public final class PlainSocketFactory implements SocketFactory {
|
|||
* All instances of this class have the same hash code.
|
||||
* There is only one instance of this class.
|
||||
*/
|
||||
public int hashCode() {
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return PlainSocketFactory.class.hashCode();
|
||||
}
|
||||
|
||||
|
|
|
@ -168,7 +168,8 @@ public final class Scheme {
|
|||
*
|
||||
* @return a human-readable string description of this scheme
|
||||
*/
|
||||
public final String toString() {
|
||||
@Override
|
||||
public final String toString() {
|
||||
if (stringRep == null) {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append(this.name);
|
||||
|
@ -187,7 +188,8 @@ public final class Scheme {
|
|||
*
|
||||
* @return <code>true</code> iff the argument is equal to this scheme
|
||||
*/
|
||||
public final boolean equals(Object obj) {
|
||||
@Override
|
||||
public final boolean equals(Object obj) {
|
||||
if (obj == null) return false;
|
||||
if (this == obj) return true;
|
||||
if (!(obj instanceof Scheme)) return false;
|
||||
|
@ -206,7 +208,8 @@ public final class Scheme {
|
|||
*
|
||||
* @return the hash code
|
||||
*/
|
||||
public int hashCode() {
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = LangUtils.HASH_SEED;
|
||||
hash = LangUtils.hashCode(hash, this.defaultPort);
|
||||
hash = LangUtils.hashCode(hash, this.name);
|
||||
|
|
|
@ -427,7 +427,8 @@ public final class HttpRoute implements Cloneable {
|
|||
* @return <code>true</code> if the argument is the same route,
|
||||
* <code>false</code>
|
||||
*/
|
||||
public final boolean equals(Object o) {
|
||||
@Override
|
||||
public final boolean equals(Object o) {
|
||||
if (o == this)
|
||||
return true;
|
||||
if (!(o instanceof HttpRoute))
|
||||
|
@ -465,7 +466,8 @@ public final class HttpRoute implements Cloneable {
|
|||
*
|
||||
* @return the hash code
|
||||
*/
|
||||
public final int hashCode() {
|
||||
@Override
|
||||
public final int hashCode() {
|
||||
|
||||
int hc = this.targetHost.hashCode();
|
||||
|
||||
|
@ -492,7 +494,8 @@ public final class HttpRoute implements Cloneable {
|
|||
*
|
||||
* @return a human-readable representation of this route
|
||||
*/
|
||||
public final String toString() {
|
||||
@Override
|
||||
public final String toString() {
|
||||
StringBuilder cab = new StringBuilder(50 + getHopCount()*30);
|
||||
|
||||
cab.append("HttpRoute[");
|
||||
|
@ -522,7 +525,8 @@ public final class HttpRoute implements Cloneable {
|
|||
|
||||
|
||||
// default implementation of clone() is sufficient
|
||||
public Object clone() throws CloneNotSupportedException {
|
||||
@Override
|
||||
public Object clone() throws CloneNotSupportedException {
|
||||
return super.clone();
|
||||
}
|
||||
|
||||
|
|
|
@ -393,7 +393,8 @@ public final class RouteTracker implements Cloneable {
|
|||
* @return <code>true</code> if the argument is the same tracked route,
|
||||
* <code>false</code>
|
||||
*/
|
||||
public final boolean equals(Object o) {
|
||||
@Override
|
||||
public final boolean equals(Object o) {
|
||||
if (o == this)
|
||||
return true;
|
||||
if (!(o instanceof RouteTracker))
|
||||
|
@ -435,7 +436,8 @@ public final class RouteTracker implements Cloneable {
|
|||
*
|
||||
* @return the hash code
|
||||
*/
|
||||
public final int hashCode() {
|
||||
@Override
|
||||
public final int hashCode() {
|
||||
|
||||
int hc = this.targetHost.hashCode();
|
||||
|
||||
|
@ -464,7 +466,8 @@ public final class RouteTracker implements Cloneable {
|
|||
*
|
||||
* @return a human-readable representation of the tracked route
|
||||
*/
|
||||
public final String toString() {
|
||||
@Override
|
||||
public final String toString() {
|
||||
StringBuilder cab = new StringBuilder(50 + getHopCount()*30);
|
||||
|
||||
cab.append("RouteTracker[");
|
||||
|
@ -496,7 +499,8 @@ public final class RouteTracker implements Cloneable {
|
|||
|
||||
|
||||
// default implementation of clone() is sufficient
|
||||
public Object clone() throws CloneNotSupportedException {
|
||||
@Override
|
||||
public Object clone() throws CloneNotSupportedException {
|
||||
return super.clone();
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,8 @@ public class AllowAllHostnameVerifier extends AbstractVerifier {
|
|||
// Allow everything - so never blowup.
|
||||
}
|
||||
|
||||
public final String toString() {
|
||||
@Override
|
||||
public final String toString() {
|
||||
return "ALLOW_ALL";
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,8 @@ public class BrowserCompatHostnameVerifier extends AbstractVerifier {
|
|||
verify(host, cns, subjectAlts, false);
|
||||
}
|
||||
|
||||
public final String toString() {
|
||||
@Override
|
||||
public final String toString() {
|
||||
return "BROWSER_COMPATIBLE";
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,8 @@ public class StrictHostnameVerifier extends AbstractVerifier {
|
|||
verify(host, cns, subjectAlts, true);
|
||||
}
|
||||
|
||||
public final String toString() {
|
||||
@Override
|
||||
public final String toString() {
|
||||
return "STRICT";
|
||||
}
|
||||
|
||||
|
|
|
@ -88,7 +88,8 @@ public final class CookieOrigin {
|
|||
return this.secure;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append("[");
|
||||
if (this.secure) {
|
||||
|
|
|
@ -89,7 +89,8 @@ public class BasicScheme extends RFC2617Scheme {
|
|||
* @throws MalformedChallengeException is thrown if the authentication challenge
|
||||
* is malformed
|
||||
*/
|
||||
public void processChallenge(
|
||||
@Override
|
||||
public void processChallenge(
|
||||
final Header header) throws MalformedChallengeException {
|
||||
super.processChallenge(header);
|
||||
this.complete = true;
|
||||
|
|
|
@ -120,7 +120,8 @@ public class DigestScheme extends RFC2617Scheme {
|
|||
* @throws MalformedChallengeException is thrown if the authentication challenge
|
||||
* is malformed
|
||||
*/
|
||||
public void processChallenge(
|
||||
@Override
|
||||
public void processChallenge(
|
||||
final Header header) throws MalformedChallengeException {
|
||||
super.processChallenge(header);
|
||||
|
||||
|
|
|
@ -147,7 +147,8 @@ public class BasicCookieStore implements CookieStore {
|
|||
return removed;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
@Override
|
||||
public String toString() {
|
||||
return cookies.toString();
|
||||
}
|
||||
|
||||
|
|
|
@ -128,7 +128,8 @@ public class BasicCredentialsProvider implements CredentialsProvider {
|
|||
return matchCredentials(this.credMap, authscope);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
@Override
|
||||
public String toString() {
|
||||
return credMap.toString();
|
||||
}
|
||||
|
||||
|
|
|
@ -121,7 +121,8 @@ public class DefaultHttpClient extends AbstractHttpClient {
|
|||
}
|
||||
|
||||
|
||||
protected HttpParams createHttpParams() {
|
||||
@Override
|
||||
protected HttpParams createHttpParams() {
|
||||
HttpParams params = new BasicHttpParams();
|
||||
HttpProtocolParams.setVersion(params,
|
||||
HttpVersion.HTTP_1_1);
|
||||
|
@ -142,7 +143,8 @@ public class DefaultHttpClient extends AbstractHttpClient {
|
|||
}
|
||||
|
||||
|
||||
protected ClientConnectionManager createClientConnectionManager() {
|
||||
@Override
|
||||
protected ClientConnectionManager createClientConnectionManager() {
|
||||
SchemeRegistry registry = new SchemeRegistry();
|
||||
registry.register(
|
||||
new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
|
||||
|
@ -175,17 +177,20 @@ public class DefaultHttpClient extends AbstractHttpClient {
|
|||
}
|
||||
|
||||
|
||||
protected HttpContext createHttpContext() {
|
||||
@Override
|
||||
protected HttpContext createHttpContext() {
|
||||
return new SyncBasicHttpContext(null);
|
||||
}
|
||||
|
||||
|
||||
protected ConnectionReuseStrategy createConnectionReuseStrategy() {
|
||||
@Override
|
||||
protected ConnectionReuseStrategy createConnectionReuseStrategy() {
|
||||
return new DefaultConnectionReuseStrategy();
|
||||
}
|
||||
|
||||
|
||||
protected AuthSchemeRegistry createAuthSchemeRegistry() {
|
||||
@Override
|
||||
protected AuthSchemeRegistry createAuthSchemeRegistry() {
|
||||
AuthSchemeRegistry registry = new AuthSchemeRegistry();
|
||||
registry.register(
|
||||
AuthPolicy.BASIC,
|
||||
|
@ -197,7 +202,8 @@ public class DefaultHttpClient extends AbstractHttpClient {
|
|||
}
|
||||
|
||||
|
||||
protected CookieSpecRegistry createCookieSpecRegistry() {
|
||||
@Override
|
||||
protected CookieSpecRegistry createCookieSpecRegistry() {
|
||||
CookieSpecRegistry registry = new CookieSpecRegistry();
|
||||
registry.register(
|
||||
CookiePolicy.BEST_MATCH,
|
||||
|
@ -218,7 +224,8 @@ public class DefaultHttpClient extends AbstractHttpClient {
|
|||
}
|
||||
|
||||
|
||||
protected BasicHttpProcessor createHttpProcessor() {
|
||||
@Override
|
||||
protected BasicHttpProcessor createHttpProcessor() {
|
||||
BasicHttpProcessor httpproc = new BasicHttpProcessor();
|
||||
httpproc.addInterceptor(new RequestDefaultHeaders());
|
||||
// Required protocol interceptors
|
||||
|
@ -238,37 +245,44 @@ public class DefaultHttpClient extends AbstractHttpClient {
|
|||
}
|
||||
|
||||
|
||||
protected HttpRequestRetryHandler createHttpRequestRetryHandler() {
|
||||
@Override
|
||||
protected HttpRequestRetryHandler createHttpRequestRetryHandler() {
|
||||
return new DefaultHttpRequestRetryHandler();
|
||||
}
|
||||
|
||||
|
||||
protected RedirectHandler createRedirectHandler() {
|
||||
@Override
|
||||
protected RedirectHandler createRedirectHandler() {
|
||||
return new DefaultRedirectHandler();
|
||||
}
|
||||
|
||||
|
||||
protected AuthenticationHandler createTargetAuthenticationHandler() {
|
||||
@Override
|
||||
protected AuthenticationHandler createTargetAuthenticationHandler() {
|
||||
return new DefaultTargetAuthenticationHandler();
|
||||
}
|
||||
|
||||
|
||||
protected AuthenticationHandler createProxyAuthenticationHandler() {
|
||||
@Override
|
||||
protected AuthenticationHandler createProxyAuthenticationHandler() {
|
||||
return new DefaultProxyAuthenticationHandler();
|
||||
}
|
||||
|
||||
|
||||
protected CookieStore createCookieStore() {
|
||||
@Override
|
||||
protected CookieStore createCookieStore() {
|
||||
return new BasicCookieStore();
|
||||
}
|
||||
|
||||
|
||||
protected CredentialsProvider createCredentialsProvider() {
|
||||
@Override
|
||||
protected CredentialsProvider createCredentialsProvider() {
|
||||
return new BasicCredentialsProvider();
|
||||
}
|
||||
|
||||
|
||||
protected void populateContext(final HttpContext context) {
|
||||
@Override
|
||||
protected void populateContext(final HttpContext context) {
|
||||
context.setAttribute(
|
||||
ClientContext.AUTHSCHEME_REGISTRY,
|
||||
getAuthSchemes());
|
||||
|
@ -285,7 +299,8 @@ public class DefaultHttpClient extends AbstractHttpClient {
|
|||
|
||||
|
||||
// non-javadoc, see base class AbstractHttpClient
|
||||
protected HttpRoutePlanner createHttpRoutePlanner() {
|
||||
@Override
|
||||
protected HttpRoutePlanner createHttpRoutePlanner() {
|
||||
return new DefaultHttpRoutePlanner(getConnectionManager());
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,8 @@ public class DefaultClientConnection extends SocketHttpClientConnection
|
|||
|
||||
|
||||
// non-javadoc, see interface OperatedClientConnection
|
||||
public final Socket getSocket() {
|
||||
@Override
|
||||
public final Socket getSocket() {
|
||||
return super.getSocket(); // base class attribute
|
||||
}
|
||||
|
||||
|
@ -119,7 +120,8 @@ public class DefaultClientConnection extends SocketHttpClientConnection
|
|||
*
|
||||
* @throws IOException in case of a problem
|
||||
*/
|
||||
public void shutdown() throws IOException {
|
||||
@Override
|
||||
public void shutdown() throws IOException {
|
||||
LOG.debug("Connection shut down");
|
||||
|
||||
Socket sock = announcedSocket; // copy volatile attribute
|
||||
|
@ -131,13 +133,15 @@ public class DefaultClientConnection extends SocketHttpClientConnection
|
|||
} // shutdown
|
||||
|
||||
|
||||
public void close() throws IOException {
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
LOG.debug("Connection closed");
|
||||
super.close();
|
||||
}
|
||||
|
||||
|
||||
protected SessionInputBuffer createSessionInputBuffer(
|
||||
@Override
|
||||
protected SessionInputBuffer createSessionInputBuffer(
|
||||
final Socket socket,
|
||||
int buffersize,
|
||||
final HttpParams params) throws IOException {
|
||||
|
@ -152,7 +156,8 @@ public class DefaultClientConnection extends SocketHttpClientConnection
|
|||
}
|
||||
|
||||
|
||||
protected SessionOutputBuffer createSessionOutputBuffer(
|
||||
@Override
|
||||
protected SessionOutputBuffer createSessionOutputBuffer(
|
||||
final Socket socket,
|
||||
int buffersize,
|
||||
final HttpParams params) throws IOException {
|
||||
|
@ -167,7 +172,8 @@ public class DefaultClientConnection extends SocketHttpClientConnection
|
|||
}
|
||||
|
||||
|
||||
protected HttpMessageParser createResponseParser(
|
||||
@Override
|
||||
protected HttpMessageParser createResponseParser(
|
||||
final SessionInputBuffer buffer,
|
||||
final HttpResponseFactory responseFactory,
|
||||
final HttpParams params) {
|
||||
|
@ -229,7 +235,8 @@ public class DefaultClientConnection extends SocketHttpClientConnection
|
|||
} // update
|
||||
|
||||
|
||||
public HttpResponse receiveResponseHeader() throws HttpException, IOException {
|
||||
@Override
|
||||
public HttpResponse receiveResponseHeader() throws HttpException, IOException {
|
||||
HttpResponse response = super.receiveResponseHeader();
|
||||
if (HEADERS_LOG.isDebugEnabled()) {
|
||||
HEADERS_LOG.debug("<< " + response.getStatusLine().toString());
|
||||
|
@ -242,7 +249,8 @@ public class DefaultClientConnection extends SocketHttpClientConnection
|
|||
}
|
||||
|
||||
|
||||
public void sendRequestHeader(HttpRequest request) throws HttpException, IOException {
|
||||
@Override
|
||||
public void sendRequestHeader(HttpRequest request) throws HttpException, IOException {
|
||||
super.sendRequestHeader(request);
|
||||
if (HEADERS_LOG.isDebugEnabled()) {
|
||||
HEADERS_LOG.debug(">> " + request.getRequestLine().toString());
|
||||
|
|
|
@ -70,7 +70,8 @@ public class DefaultResponseParser extends AbstractMessageParser {
|
|||
}
|
||||
|
||||
|
||||
protected HttpMessage parseHead(
|
||||
@Override
|
||||
protected HttpMessage parseHead(
|
||||
final SessionInputBuffer sessionBuffer) throws IOException, HttpException {
|
||||
// clear the buffer
|
||||
this.lineBuf.clear();
|
||||
|
|
|
@ -374,7 +374,8 @@ public class SingleClientConnManager implements ClientConnectionManager {
|
|||
|
||||
|
||||
// non-javadoc, see base AbstractPoolEntry
|
||||
protected ClientConnectionOperator getOperator() {
|
||||
@Override
|
||||
protected ClientConnectionOperator getOperator() {
|
||||
return SingleClientConnManager.this.connOperator;
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,8 @@ public class BasicPoolEntry extends AbstractPoolEntry {
|
|||
|
||||
|
||||
// non-javadoc, see base AbstractPoolEntry
|
||||
protected ClientConnectionOperator getOperator() {
|
||||
@Override
|
||||
protected ClientConnectionOperator getOperator() {
|
||||
return this.connOperator;
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,8 @@ public class BasicPooledConnAdapter extends AbstractPooledConnAdapter {
|
|||
|
||||
|
||||
// non-javadoc, see base class
|
||||
protected void detach() {
|
||||
@Override
|
||||
protected void detach() {
|
||||
// override needed only to make method visible in this package
|
||||
super.detach();
|
||||
}
|
||||
|
|
|
@ -208,7 +208,8 @@ public class ConnPoolByRoute extends AbstractConnPool {
|
|||
|
||||
|
||||
// non-javadoc, see base class AbstractConnPool
|
||||
public BasicPoolEntry getEntry(HttpRoute route,
|
||||
@Override
|
||||
public BasicPoolEntry getEntry(HttpRoute route,
|
||||
long timeout, TimeUnit tunit,
|
||||
ClientConnectionOperator operator)
|
||||
throws ConnectionPoolTimeoutException, InterruptedException {
|
||||
|
@ -310,7 +311,8 @@ public class ConnPoolByRoute extends AbstractConnPool {
|
|||
|
||||
|
||||
// non-javadoc, see base class AbstractConnPool
|
||||
public void freeEntry(BasicPoolEntry entry) {
|
||||
@Override
|
||||
public void freeEntry(BasicPoolEntry entry) {
|
||||
|
||||
HttpRoute route = entry.getPlannedRoute();
|
||||
if (LOG.isDebugEnabled()) {
|
||||
|
@ -494,7 +496,8 @@ public class ConnPoolByRoute extends AbstractConnPool {
|
|||
|
||||
|
||||
// non-javadoc, see base class AbstractConnPool
|
||||
protected void handleLostEntry(HttpRoute route) {
|
||||
@Override
|
||||
protected void handleLostEntry(HttpRoute route) {
|
||||
|
||||
try {
|
||||
poolLock.lock();
|
||||
|
@ -566,7 +569,8 @@ public class ConnPoolByRoute extends AbstractConnPool {
|
|||
//@@@ revise this cleanup stuff
|
||||
//@@@ move method to base class when deleteEntry() is fixed
|
||||
// non-javadoc, see base class AbstractConnPool
|
||||
public void deleteClosedConnections() {
|
||||
@Override
|
||||
public void deleteClosedConnections() {
|
||||
|
||||
try {
|
||||
poolLock.lock();
|
||||
|
@ -587,7 +591,8 @@ public class ConnPoolByRoute extends AbstractConnPool {
|
|||
|
||||
|
||||
// non-javadoc, see base class AbstractConnPool
|
||||
public void shutdown() {
|
||||
@Override
|
||||
public void shutdown() {
|
||||
|
||||
try {
|
||||
poolLock.lock();
|
||||
|
|
|
@ -131,7 +131,8 @@ public class RefQueueWorker implements Runnable {
|
|||
*
|
||||
* @return a descriptive string for this worker
|
||||
*/
|
||||
public String toString() {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RefQueueWorker::" + this.workerThread;
|
||||
}
|
||||
|
||||
|
|
|
@ -311,7 +311,8 @@ public class BasicClientCookie implements SetCookie, ClientCookie {
|
|||
return this.attribs.get(name) != null;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder buffer = new StringBuilder();
|
||||
buffer.append("[version: ");
|
||||
buffer.append(Integer.toString(this.cookieVersion));
|
||||
|
|
|
@ -58,7 +58,8 @@ public class BasicClientCookie2 extends BasicClientCookie implements SetCookie2
|
|||
super(name, value);
|
||||
}
|
||||
|
||||
public int[] getPorts() {
|
||||
@Override
|
||||
public int[] getPorts() {
|
||||
return this.ports;
|
||||
}
|
||||
|
||||
|
@ -66,7 +67,8 @@ public class BasicClientCookie2 extends BasicClientCookie implements SetCookie2
|
|||
this.ports = ports;
|
||||
}
|
||||
|
||||
public String getCommentURL() {
|
||||
@Override
|
||||
public String getCommentURL() {
|
||||
return this.commentURL;
|
||||
}
|
||||
|
||||
|
@ -78,11 +80,13 @@ public class BasicClientCookie2 extends BasicClientCookie implements SetCookie2
|
|||
this.discard = discard;
|
||||
}
|
||||
|
||||
public boolean isPersistent() {
|
||||
@Override
|
||||
public boolean isPersistent() {
|
||||
return !this.discard && super.isPersistent();
|
||||
}
|
||||
|
||||
public boolean isExpired(final Date date) {
|
||||
@Override
|
||||
public boolean isExpired(final Date date) {
|
||||
return this.discard || super.isExpired(date);
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,8 @@ public class BasicSecureHandler extends AbstractCookieAttributeHandler {
|
|||
cookie.setSecure(true);
|
||||
}
|
||||
|
||||
public boolean match(final Cookie cookie, final CookieOrigin origin) {
|
||||
@Override
|
||||
public boolean match(final Cookie cookie, final CookieOrigin origin) {
|
||||
if (cookie == null) {
|
||||
throw new IllegalArgumentException("Cookie may not be null");
|
||||
}
|
||||
|
|
|
@ -216,7 +216,8 @@ public final class DateUtils {
|
|||
private static final ThreadLocal<SoftReference<Map<String, SimpleDateFormat>>>
|
||||
THREADLOCAL_FORMATS = new ThreadLocal<SoftReference<Map<String, SimpleDateFormat>>>() {
|
||||
|
||||
protected SoftReference<Map<String, SimpleDateFormat>> initialValue() {
|
||||
@Override
|
||||
protected SoftReference<Map<String, SimpleDateFormat>> initialValue() {
|
||||
return new SoftReference<Map<String, SimpleDateFormat>>(
|
||||
new HashMap<String, SimpleDateFormat>());
|
||||
}
|
||||
|
|
|
@ -42,7 +42,8 @@ public class NetscapeDomainHandler extends BasicDomainHandler {
|
|||
super();
|
||||
}
|
||||
|
||||
public void validate(final Cookie cookie, final CookieOrigin origin)
|
||||
@Override
|
||||
public void validate(final Cookie cookie, final CookieOrigin origin)
|
||||
throws MalformedCookieException {
|
||||
super.validate(cookie, origin);
|
||||
// Perform Netscape Cookie draft specific validation
|
||||
|
@ -88,7 +89,8 @@ public class NetscapeDomainHandler extends BasicDomainHandler {
|
|||
return false;
|
||||
}
|
||||
|
||||
public boolean match(Cookie cookie, CookieOrigin origin) {
|
||||
@Override
|
||||
public boolean match(Cookie cookie, CookieOrigin origin) {
|
||||
if (cookie == null) {
|
||||
throw new IllegalArgumentException("Cookie may not be null");
|
||||
}
|
||||
|
|
|
@ -112,6 +112,7 @@ public class RFC2109Spec extends CookieSpecBase {
|
|||
return parse(elems, origin);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validate(final Cookie cookie, final CookieOrigin origin)
|
||||
throws MalformedCookieException {
|
||||
if (cookie == null) {
|
||||
|
|
|
@ -60,7 +60,8 @@ public class RFC2109VersionHandler extends AbstractCookieAttributeHandler {
|
|||
}
|
||||
}
|
||||
|
||||
public void validate(final Cookie cookie, final CookieOrigin origin)
|
||||
@Override
|
||||
public void validate(final Cookie cookie, final CookieOrigin origin)
|
||||
throws MalformedCookieException {
|
||||
if (cookie == null) {
|
||||
throw new IllegalArgumentException("Cookie may not be null");
|
||||
|
|
|
@ -91,7 +91,8 @@ public class RFC2965Spec extends RFC2109Spec {
|
|||
return cookie;
|
||||
}
|
||||
|
||||
public List<Cookie> parse(
|
||||
@Override
|
||||
public List<Cookie> parse(
|
||||
final Header header,
|
||||
CookieOrigin origin) throws MalformedCookieException {
|
||||
if (header == null) {
|
||||
|
@ -149,7 +150,8 @@ public class RFC2965Spec extends RFC2109Spec {
|
|||
return cookies;
|
||||
}
|
||||
|
||||
public void validate(final Cookie cookie, CookieOrigin origin)
|
||||
@Override
|
||||
public void validate(final Cookie cookie, CookieOrigin origin)
|
||||
throws MalformedCookieException {
|
||||
if (cookie == null) {
|
||||
throw new IllegalArgumentException("Cookie may not be null");
|
||||
|
@ -161,7 +163,8 @@ public class RFC2965Spec extends RFC2109Spec {
|
|||
super.validate(cookie, origin);
|
||||
}
|
||||
|
||||
public boolean match(final Cookie cookie, CookieOrigin origin) {
|
||||
@Override
|
||||
public boolean match(final Cookie cookie, CookieOrigin origin) {
|
||||
if (cookie == null) {
|
||||
throw new IllegalArgumentException("Cookie may not be null");
|
||||
}
|
||||
|
@ -175,7 +178,8 @@ public class RFC2965Spec extends RFC2109Spec {
|
|||
/**
|
||||
* Adds valid Port attribute value, e.g. "8000,8001,8002"
|
||||
*/
|
||||
protected void formatCookieAsVer(final CharArrayBuffer buffer,
|
||||
@Override
|
||||
protected void formatCookieAsVer(final CharArrayBuffer buffer,
|
||||
final Cookie cookie, int version) {
|
||||
super.formatCookieAsVer(buffer, cookie, version);
|
||||
// format port attribute
|
||||
|
@ -237,11 +241,13 @@ public class RFC2965Spec extends RFC2109Spec {
|
|||
}
|
||||
}
|
||||
|
||||
public int getVersion() {
|
||||
@Override
|
||||
public int getVersion() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
public Header getVersionHeader() {
|
||||
@Override
|
||||
public Header getVersionHeader() {
|
||||
CharArrayBuffer buffer = new CharArrayBuffer(40);
|
||||
buffer.append(SM.COOKIE2);
|
||||
buffer.append(": ");
|
||||
|
|
|
@ -89,7 +89,8 @@ public class ExecReqThread extends GetConnThread {
|
|||
* This method is invoked when the thread is started.
|
||||
* It invokes the base class implementation.
|
||||
*/
|
||||
public void run() {
|
||||
@Override
|
||||
public void run() {
|
||||
super.run(); // obtain connection
|
||||
if (connection == null)
|
||||
return; // problem obtaining connection
|
||||
|
|
|
@ -68,7 +68,8 @@ public class GetConnThread extends Thread {
|
|||
/**
|
||||
* This method is executed when the thread is started.
|
||||
*/
|
||||
public void run() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
connection = conn_manager.getConnection
|
||||
(conn_route, conn_timeout, TimeUnit.MILLISECONDS);
|
||||
|
|
|
@ -63,7 +63,8 @@ public class AwaitThread extends Thread {
|
|||
/**
|
||||
* This method is executed when the thread is started.
|
||||
*/
|
||||
public void run() {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
wait_lock.lock();
|
||||
waiting = true;
|
||||
|
|
|
@ -81,7 +81,8 @@ public class TestDumbHelpers extends TestCase {
|
|||
}
|
||||
|
||||
|
||||
protected void setUp() {
|
||||
@Override
|
||||
protected void setUp() {
|
||||
supportedSchemes = new SchemeRegistry();
|
||||
SocketFactory sf = PlainSocketFactory.getSocketFactory();
|
||||
supportedSchemes.register(new Scheme("http", sf, 80));
|
||||
|
|
|
@ -252,7 +252,8 @@ public class LocalTestServer {
|
|||
}
|
||||
|
||||
|
||||
public String toString() {
|
||||
@Override
|
||||
public String toString() {
|
||||
ServerSocket ssock = servicedSocket; // avoid synchronization
|
||||
StringBuffer sb = new StringBuffer(80);
|
||||
sb.append("LocalTestServer/");
|
||||
|
|
|
@ -109,7 +109,8 @@ public abstract class ServerTestBase extends TestCase {
|
|||
*
|
||||
* @throws Exception in case of a problem
|
||||
*/
|
||||
protected void setUp() throws Exception {
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
|
||||
if (defaultParams == null) {
|
||||
defaultParams = new BasicHttpParams();
|
||||
|
@ -159,7 +160,8 @@ public abstract class ServerTestBase extends TestCase {
|
|||
*
|
||||
* @see #setUp setUp()
|
||||
*/
|
||||
protected void tearDown() throws Exception {
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
localServer.stop();
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,8 @@ public class SecureSocketFactoryMockup extends SocketFactoryMockup
|
|||
|
||||
// don't implement equals and hashcode, all instances are different!
|
||||
|
||||
public String toString() {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SecureSocketFactoryMockup." + mockup_name;
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,8 @@ public class SocketFactoryMockup implements SocketFactory {
|
|||
|
||||
// don't implement equals and hashcode, all instances are different!
|
||||
|
||||
public String toString() {
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SocketFactoryMockup." + mockup_name;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue