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:
Sebastian Bazley 2008-01-31 20:38:04 +00:00
parent 2cc2818642
commit 9b592fd961
48 changed files with 203 additions and 101 deletions

View File

@ -228,7 +228,8 @@ public class AuthScope {
/** /**
* @see java.lang.Object#equals(Object) * @see java.lang.Object#equals(Object)
*/ */
public boolean equals(Object o) { @Override
public boolean equals(Object o) {
if (o == null) { if (o == null) {
return false; return false;
} }
@ -249,7 +250,8 @@ public class AuthScope {
/** /**
* @see java.lang.Object#toString() * @see java.lang.Object#toString()
*/ */
public String toString() { @Override
public String toString() {
StringBuffer buffer = new StringBuffer(); StringBuffer buffer = new StringBuffer();
if (this.scheme != null) { if (this.scheme != null) {
buffer.append(this.scheme.toUpperCase()); buffer.append(this.scheme.toUpperCase());
@ -276,7 +278,8 @@ public class AuthScope {
/** /**
* @see java.lang.Object#hashCode() * @see java.lang.Object#hashCode()
*/ */
public int hashCode() { @Override
public int hashCode() {
int hash = LangUtils.HASH_SEED; int hash = LangUtils.HASH_SEED;
hash = LangUtils.hashCode(hash, this.host); hash = LangUtils.hashCode(hash, this.host);
hash = LangUtils.hashCode(hash, this.port); hash = LangUtils.hashCode(hash, this.port);

View File

@ -130,7 +130,8 @@ public class UsernamePasswordCredentials implements Credentials {
* *
* @return the username:password formed string * @return the username:password formed string
*/ */
public String toString() { @Override
public String toString() {
StringBuffer result = new StringBuffer(); StringBuffer result = new StringBuffer();
result.append(this.userName); result.append(this.userName);
result.append(":"); result.append(":");
@ -143,7 +144,8 @@ public class UsernamePasswordCredentials implements Credentials {
* *
* @return The hash code including user name and password. * @return The hash code including user name and password.
*/ */
public int hashCode() { @Override
public int hashCode() {
int hash = LangUtils.HASH_SEED; int hash = LangUtils.HASH_SEED;
hash = LangUtils.hashCode(hash, this.userName); hash = LangUtils.hashCode(hash, this.userName);
hash = LangUtils.hashCode(hash, this.password); hash = LangUtils.hashCode(hash, this.password);
@ -158,7 +160,8 @@ public class UsernamePasswordCredentials implements Credentials {
* *
* @return <code>true</code> if the object is equivalent. * @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 (o == null) return false;
if (this == o) return true; if (this == o) return true;
// note - to allow for sub-classing, this checks that class is the same // note - to allow for sub-classing, this checks that class is the same

View File

@ -132,7 +132,8 @@ public class AuthState {
} }
public String toString() { @Override
public String toString() {
StringBuilder buffer = new StringBuilder(); StringBuilder buffer = new StringBuilder();
buffer.append("auth scope ["); buffer.append("auth scope [");
buffer.append(this.authScope); buffer.append(this.authScope);

View File

@ -73,7 +73,8 @@ public class HttpGet extends HttpRequestBase {
setURI(new URI(uri)); setURI(new URI(uri));
} }
public String getMethod() { @Override
public String getMethod() {
return METHOD_NAME; return METHOD_NAME;
} }

View File

@ -73,7 +73,8 @@ public class HttpHead extends HttpRequestBase {
setURI(new URI(uri)); setURI(new URI(uri));
} }
public String getMethod() { @Override
public String getMethod() {
return METHOD_NAME; return METHOD_NAME;
} }

View File

@ -78,7 +78,8 @@ public class HttpOptions extends HttpRequestBase {
setURI(new URI(uri)); setURI(new URI(uri));
} }
public String getMethod() { @Override
public String getMethod() {
return METHOD_NAME; return METHOD_NAME;
} }

View File

@ -77,7 +77,8 @@ public class HttpPost extends HttpEntityEnclosingRequestBase {
setURI(new URI(uri)); setURI(new URI(uri));
} }
public String getMethod() { @Override
public String getMethod() {
return METHOD_NAME; return METHOD_NAME;
} }

View File

@ -69,7 +69,8 @@ public class HttpPut extends HttpEntityEnclosingRequestBase {
setURI(new URI(uri)); setURI(new URI(uri));
} }
public String getMethod() { @Override
public String getMethod() {
return METHOD_NAME; return METHOD_NAME;
} }

View File

@ -72,7 +72,8 @@ public class HttpTrace extends HttpRequestBase {
setURI(new URI(uri)); setURI(new URI(uri));
} }
public String getMethod() { @Override
public String getMethod() {
return METHOD_NAME; return METHOD_NAME;
} }

View File

@ -78,7 +78,8 @@ public class UrlEncodedFormEntity extends AbstractHttpEntity {
return new ByteArrayInputStream(this.content); return new ByteArrayInputStream(this.content);
} }
public Header getContentType() { @Override
public Header getContentType() {
return new BasicHeader(HTTP.CONTENT_TYPE, FORM_URL_ENCODED_CONTENT_TYPE); return new BasicHeader(HTTP.CONTENT_TYPE, FORM_URL_ENCODED_CONTENT_TYPE);
} }

View File

@ -86,20 +86,23 @@ public class BasicManagedEntity extends HttpEntityWrapper
// non-javadoc, see interface HttpEntity // non-javadoc, see interface HttpEntity
public boolean isRepeatable() { @Override
public boolean isRepeatable() {
return false; return false;
} }
// non-javadoc, see interface HttpEntity // non-javadoc, see interface HttpEntity
public InputStream getContent() throws IOException { @Override
public InputStream getContent() throws IOException {
return new EofSensorInputStream(wrappedEntity.getContent(), this); return new EofSensorInputStream(wrappedEntity.getContent(), this);
} }
// non-javadoc, see interface HttpEntity // non-javadoc, see interface HttpEntity
public void consumeContent() throws IOException { @Override
public void consumeContent() throws IOException {
if (managedConn == null) if (managedConn == null)
return; return;

View File

@ -131,7 +131,8 @@ public class EofSensorInputStream extends InputStream
// non-javadoc, see base class InputStream // non-javadoc, see base class InputStream
public int read() throws IOException { @Override
public int read() throws IOException {
int l = -1; int l = -1;
if (isReadAllowed()) { if (isReadAllowed()) {
@ -149,7 +150,8 @@ public class EofSensorInputStream extends InputStream
// non-javadoc, see base class 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; int l = -1;
if (isReadAllowed()) { if (isReadAllowed()) {
@ -167,7 +169,8 @@ public class EofSensorInputStream extends InputStream
// non-javadoc, see base class 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; int l = -1;
if (isReadAllowed()) { if (isReadAllowed()) {
@ -184,7 +187,8 @@ public class EofSensorInputStream extends InputStream
// non-javadoc, see base class InputStream // non-javadoc, see base class InputStream
public int available() throws IOException { @Override
public int available() throws IOException {
int a = 0; // not -1 int a = 0; // not -1
if (isReadAllowed()) { if (isReadAllowed()) {
@ -202,7 +206,8 @@ public class EofSensorInputStream extends InputStream
// non-javadoc, see base class InputStream // non-javadoc, see base class InputStream
public void close() throws IOException { @Override
public void close() throws IOException {
// tolerate multiple calls to close() // tolerate multiple calls to close()
selfClosed = true; selfClosed = true;
checkClose(); checkClose();

View File

@ -157,7 +157,8 @@ public final class PlainSocketFactory implements SocketFactory {
* *
* @return iff the argument is this object * @return iff the argument is this object
*/ */
public boolean equals(Object obj) { @Override
public boolean equals(Object obj) {
return (obj == this); return (obj == this);
} }
@ -166,7 +167,8 @@ public final class PlainSocketFactory implements SocketFactory {
* All instances of this class have the same hash code. * All instances of this class have the same hash code.
* There is only one instance of this class. * There is only one instance of this class.
*/ */
public int hashCode() { @Override
public int hashCode() {
return PlainSocketFactory.class.hashCode(); return PlainSocketFactory.class.hashCode();
} }

View File

@ -168,7 +168,8 @@ public final class Scheme {
* *
* @return a human-readable string description of this scheme * @return a human-readable string description of this scheme
*/ */
public final String toString() { @Override
public final String toString() {
if (stringRep == null) { if (stringRep == null) {
StringBuilder buffer = new StringBuilder(); StringBuilder buffer = new StringBuilder();
buffer.append(this.name); buffer.append(this.name);
@ -187,7 +188,8 @@ public final class Scheme {
* *
* @return <code>true</code> iff the argument is equal to this 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 (obj == null) return false;
if (this == obj) return true; if (this == obj) return true;
if (!(obj instanceof Scheme)) return false; if (!(obj instanceof Scheme)) return false;
@ -206,7 +208,8 @@ public final class Scheme {
* *
* @return the hash code * @return the hash code
*/ */
public int hashCode() { @Override
public int hashCode() {
int hash = LangUtils.HASH_SEED; int hash = LangUtils.HASH_SEED;
hash = LangUtils.hashCode(hash, this.defaultPort); hash = LangUtils.hashCode(hash, this.defaultPort);
hash = LangUtils.hashCode(hash, this.name); hash = LangUtils.hashCode(hash, this.name);

View File

@ -427,7 +427,8 @@ public final class HttpRoute implements Cloneable {
* @return <code>true</code> if the argument is the same route, * @return <code>true</code> if the argument is the same route,
* <code>false</code> * <code>false</code>
*/ */
public final boolean equals(Object o) { @Override
public final boolean equals(Object o) {
if (o == this) if (o == this)
return true; return true;
if (!(o instanceof HttpRoute)) if (!(o instanceof HttpRoute))
@ -465,7 +466,8 @@ public final class HttpRoute implements Cloneable {
* *
* @return the hash code * @return the hash code
*/ */
public final int hashCode() { @Override
public final int hashCode() {
int hc = this.targetHost.hashCode(); int hc = this.targetHost.hashCode();
@ -492,7 +494,8 @@ public final class HttpRoute implements Cloneable {
* *
* @return a human-readable representation of this route * @return a human-readable representation of this route
*/ */
public final String toString() { @Override
public final String toString() {
StringBuilder cab = new StringBuilder(50 + getHopCount()*30); StringBuilder cab = new StringBuilder(50 + getHopCount()*30);
cab.append("HttpRoute["); cab.append("HttpRoute[");
@ -522,7 +525,8 @@ public final class HttpRoute implements Cloneable {
// default implementation of clone() is sufficient // default implementation of clone() is sufficient
public Object clone() throws CloneNotSupportedException { @Override
public Object clone() throws CloneNotSupportedException {
return super.clone(); return super.clone();
} }

View File

@ -393,7 +393,8 @@ public final class RouteTracker implements Cloneable {
* @return <code>true</code> if the argument is the same tracked route, * @return <code>true</code> if the argument is the same tracked route,
* <code>false</code> * <code>false</code>
*/ */
public final boolean equals(Object o) { @Override
public final boolean equals(Object o) {
if (o == this) if (o == this)
return true; return true;
if (!(o instanceof RouteTracker)) if (!(o instanceof RouteTracker))
@ -435,7 +436,8 @@ public final class RouteTracker implements Cloneable {
* *
* @return the hash code * @return the hash code
*/ */
public final int hashCode() { @Override
public final int hashCode() {
int hc = this.targetHost.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 * @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); StringBuilder cab = new StringBuilder(50 + getHopCount()*30);
cab.append("RouteTracker["); cab.append("RouteTracker[");
@ -496,7 +499,8 @@ public final class RouteTracker implements Cloneable {
// default implementation of clone() is sufficient // default implementation of clone() is sufficient
public Object clone() throws CloneNotSupportedException { @Override
public Object clone() throws CloneNotSupportedException {
return super.clone(); return super.clone();
} }

View File

@ -46,7 +46,8 @@ public class AllowAllHostnameVerifier extends AbstractVerifier {
// Allow everything - so never blowup. // Allow everything - so never blowup.
} }
public final String toString() { @Override
public final String toString() {
return "ALLOW_ALL"; return "ALLOW_ALL";
} }

View File

@ -54,7 +54,8 @@ public class BrowserCompatHostnameVerifier extends AbstractVerifier {
verify(host, cns, subjectAlts, false); verify(host, cns, subjectAlts, false);
} }
public final String toString() { @Override
public final String toString() {
return "BROWSER_COMPATIBLE"; return "BROWSER_COMPATIBLE";
} }

View File

@ -61,7 +61,8 @@ public class StrictHostnameVerifier extends AbstractVerifier {
verify(host, cns, subjectAlts, true); verify(host, cns, subjectAlts, true);
} }
public final String toString() { @Override
public final String toString() {
return "STRICT"; return "STRICT";
} }

View File

@ -88,7 +88,8 @@ public final class CookieOrigin {
return this.secure; return this.secure;
} }
public String toString() { @Override
public String toString() {
StringBuilder buffer = new StringBuilder(); StringBuilder buffer = new StringBuilder();
buffer.append("["); buffer.append("[");
if (this.secure) { if (this.secure) {

View File

@ -89,7 +89,8 @@ public class BasicScheme extends RFC2617Scheme {
* @throws MalformedChallengeException is thrown if the authentication challenge * @throws MalformedChallengeException is thrown if the authentication challenge
* is malformed * is malformed
*/ */
public void processChallenge( @Override
public void processChallenge(
final Header header) throws MalformedChallengeException { final Header header) throws MalformedChallengeException {
super.processChallenge(header); super.processChallenge(header);
this.complete = true; this.complete = true;

View File

@ -120,7 +120,8 @@ public class DigestScheme extends RFC2617Scheme {
* @throws MalformedChallengeException is thrown if the authentication challenge * @throws MalformedChallengeException is thrown if the authentication challenge
* is malformed * is malformed
*/ */
public void processChallenge( @Override
public void processChallenge(
final Header header) throws MalformedChallengeException { final Header header) throws MalformedChallengeException {
super.processChallenge(header); super.processChallenge(header);

View File

@ -147,7 +147,8 @@ public class BasicCookieStore implements CookieStore {
return removed; return removed;
} }
public String toString() { @Override
public String toString() {
return cookies.toString(); return cookies.toString();
} }

View File

@ -128,7 +128,8 @@ public class BasicCredentialsProvider implements CredentialsProvider {
return matchCredentials(this.credMap, authscope); return matchCredentials(this.credMap, authscope);
} }
public String toString() { @Override
public String toString() {
return credMap.toString(); return credMap.toString();
} }

View File

@ -121,7 +121,8 @@ public class DefaultHttpClient extends AbstractHttpClient {
} }
protected HttpParams createHttpParams() { @Override
protected HttpParams createHttpParams() {
HttpParams params = new BasicHttpParams(); HttpParams params = new BasicHttpParams();
HttpProtocolParams.setVersion(params, HttpProtocolParams.setVersion(params,
HttpVersion.HTTP_1_1); HttpVersion.HTTP_1_1);
@ -142,7 +143,8 @@ public class DefaultHttpClient extends AbstractHttpClient {
} }
protected ClientConnectionManager createClientConnectionManager() { @Override
protected ClientConnectionManager createClientConnectionManager() {
SchemeRegistry registry = new SchemeRegistry(); SchemeRegistry registry = new SchemeRegistry();
registry.register( registry.register(
new Scheme("http", PlainSocketFactory.getSocketFactory(), 80)); 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); return new SyncBasicHttpContext(null);
} }
protected ConnectionReuseStrategy createConnectionReuseStrategy() { @Override
protected ConnectionReuseStrategy createConnectionReuseStrategy() {
return new DefaultConnectionReuseStrategy(); return new DefaultConnectionReuseStrategy();
} }
protected AuthSchemeRegistry createAuthSchemeRegistry() { @Override
protected AuthSchemeRegistry createAuthSchemeRegistry() {
AuthSchemeRegistry registry = new AuthSchemeRegistry(); AuthSchemeRegistry registry = new AuthSchemeRegistry();
registry.register( registry.register(
AuthPolicy.BASIC, AuthPolicy.BASIC,
@ -197,7 +202,8 @@ public class DefaultHttpClient extends AbstractHttpClient {
} }
protected CookieSpecRegistry createCookieSpecRegistry() { @Override
protected CookieSpecRegistry createCookieSpecRegistry() {
CookieSpecRegistry registry = new CookieSpecRegistry(); CookieSpecRegistry registry = new CookieSpecRegistry();
registry.register( registry.register(
CookiePolicy.BEST_MATCH, CookiePolicy.BEST_MATCH,
@ -218,7 +224,8 @@ public class DefaultHttpClient extends AbstractHttpClient {
} }
protected BasicHttpProcessor createHttpProcessor() { @Override
protected BasicHttpProcessor createHttpProcessor() {
BasicHttpProcessor httpproc = new BasicHttpProcessor(); BasicHttpProcessor httpproc = new BasicHttpProcessor();
httpproc.addInterceptor(new RequestDefaultHeaders()); httpproc.addInterceptor(new RequestDefaultHeaders());
// Required protocol interceptors // Required protocol interceptors
@ -238,37 +245,44 @@ public class DefaultHttpClient extends AbstractHttpClient {
} }
protected HttpRequestRetryHandler createHttpRequestRetryHandler() { @Override
protected HttpRequestRetryHandler createHttpRequestRetryHandler() {
return new DefaultHttpRequestRetryHandler(); return new DefaultHttpRequestRetryHandler();
} }
protected RedirectHandler createRedirectHandler() { @Override
protected RedirectHandler createRedirectHandler() {
return new DefaultRedirectHandler(); return new DefaultRedirectHandler();
} }
protected AuthenticationHandler createTargetAuthenticationHandler() { @Override
protected AuthenticationHandler createTargetAuthenticationHandler() {
return new DefaultTargetAuthenticationHandler(); return new DefaultTargetAuthenticationHandler();
} }
protected AuthenticationHandler createProxyAuthenticationHandler() { @Override
protected AuthenticationHandler createProxyAuthenticationHandler() {
return new DefaultProxyAuthenticationHandler(); return new DefaultProxyAuthenticationHandler();
} }
protected CookieStore createCookieStore() { @Override
protected CookieStore createCookieStore() {
return new BasicCookieStore(); return new BasicCookieStore();
} }
protected CredentialsProvider createCredentialsProvider() { @Override
protected CredentialsProvider createCredentialsProvider() {
return new BasicCredentialsProvider(); return new BasicCredentialsProvider();
} }
protected void populateContext(final HttpContext context) { @Override
protected void populateContext(final HttpContext context) {
context.setAttribute( context.setAttribute(
ClientContext.AUTHSCHEME_REGISTRY, ClientContext.AUTHSCHEME_REGISTRY,
getAuthSchemes()); getAuthSchemes());
@ -285,7 +299,8 @@ public class DefaultHttpClient extends AbstractHttpClient {
// non-javadoc, see base class AbstractHttpClient // non-javadoc, see base class AbstractHttpClient
protected HttpRoutePlanner createHttpRoutePlanner() { @Override
protected HttpRoutePlanner createHttpRoutePlanner() {
return new DefaultHttpRoutePlanner(getConnectionManager()); return new DefaultHttpRoutePlanner(getConnectionManager());
} }

View File

@ -97,7 +97,8 @@ public class DefaultClientConnection extends SocketHttpClientConnection
// non-javadoc, see interface OperatedClientConnection // non-javadoc, see interface OperatedClientConnection
public final Socket getSocket() { @Override
public final Socket getSocket() {
return super.getSocket(); // base class attribute return super.getSocket(); // base class attribute
} }
@ -119,7 +120,8 @@ public class DefaultClientConnection extends SocketHttpClientConnection
* *
* @throws IOException in case of a problem * @throws IOException in case of a problem
*/ */
public void shutdown() throws IOException { @Override
public void shutdown() throws IOException {
LOG.debug("Connection shut down"); LOG.debug("Connection shut down");
Socket sock = announcedSocket; // copy volatile attribute Socket sock = announcedSocket; // copy volatile attribute
@ -131,13 +133,15 @@ public class DefaultClientConnection extends SocketHttpClientConnection
} // shutdown } // shutdown
public void close() throws IOException { @Override
public void close() throws IOException {
LOG.debug("Connection closed"); LOG.debug("Connection closed");
super.close(); super.close();
} }
protected SessionInputBuffer createSessionInputBuffer( @Override
protected SessionInputBuffer createSessionInputBuffer(
final Socket socket, final Socket socket,
int buffersize, int buffersize,
final HttpParams params) throws IOException { final HttpParams params) throws IOException {
@ -152,7 +156,8 @@ public class DefaultClientConnection extends SocketHttpClientConnection
} }
protected SessionOutputBuffer createSessionOutputBuffer( @Override
protected SessionOutputBuffer createSessionOutputBuffer(
final Socket socket, final Socket socket,
int buffersize, int buffersize,
final HttpParams params) throws IOException { 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 SessionInputBuffer buffer,
final HttpResponseFactory responseFactory, final HttpResponseFactory responseFactory,
final HttpParams params) { final HttpParams params) {
@ -229,7 +235,8 @@ public class DefaultClientConnection extends SocketHttpClientConnection
} // update } // update
public HttpResponse receiveResponseHeader() throws HttpException, IOException { @Override
public HttpResponse receiveResponseHeader() throws HttpException, IOException {
HttpResponse response = super.receiveResponseHeader(); HttpResponse response = super.receiveResponseHeader();
if (HEADERS_LOG.isDebugEnabled()) { if (HEADERS_LOG.isDebugEnabled()) {
HEADERS_LOG.debug("<< " + response.getStatusLine().toString()); 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); super.sendRequestHeader(request);
if (HEADERS_LOG.isDebugEnabled()) { if (HEADERS_LOG.isDebugEnabled()) {
HEADERS_LOG.debug(">> " + request.getRequestLine().toString()); HEADERS_LOG.debug(">> " + request.getRequestLine().toString());

View File

@ -70,7 +70,8 @@ public class DefaultResponseParser extends AbstractMessageParser {
} }
protected HttpMessage parseHead( @Override
protected HttpMessage parseHead(
final SessionInputBuffer sessionBuffer) throws IOException, HttpException { final SessionInputBuffer sessionBuffer) throws IOException, HttpException {
// clear the buffer // clear the buffer
this.lineBuf.clear(); this.lineBuf.clear();

View File

@ -374,7 +374,8 @@ public class SingleClientConnManager implements ClientConnectionManager {
// non-javadoc, see base AbstractPoolEntry // non-javadoc, see base AbstractPoolEntry
protected ClientConnectionOperator getOperator() { @Override
protected ClientConnectionOperator getOperator() {
return SingleClientConnManager.this.connOperator; return SingleClientConnManager.this.connOperator;
} }

View File

@ -82,7 +82,8 @@ public class BasicPoolEntry extends AbstractPoolEntry {
// non-javadoc, see base AbstractPoolEntry // non-javadoc, see base AbstractPoolEntry
protected ClientConnectionOperator getOperator() { @Override
protected ClientConnectionOperator getOperator() {
return this.connOperator; return this.connOperator;
} }

View File

@ -78,7 +78,8 @@ public class BasicPooledConnAdapter extends AbstractPooledConnAdapter {
// non-javadoc, see base class // non-javadoc, see base class
protected void detach() { @Override
protected void detach() {
// override needed only to make method visible in this package // override needed only to make method visible in this package
super.detach(); super.detach();
} }

View File

@ -208,7 +208,8 @@ public class ConnPoolByRoute extends AbstractConnPool {
// non-javadoc, see base class AbstractConnPool // non-javadoc, see base class AbstractConnPool
public BasicPoolEntry getEntry(HttpRoute route, @Override
public BasicPoolEntry getEntry(HttpRoute route,
long timeout, TimeUnit tunit, long timeout, TimeUnit tunit,
ClientConnectionOperator operator) ClientConnectionOperator operator)
throws ConnectionPoolTimeoutException, InterruptedException { throws ConnectionPoolTimeoutException, InterruptedException {
@ -310,7 +311,8 @@ public class ConnPoolByRoute extends AbstractConnPool {
// non-javadoc, see base class AbstractConnPool // non-javadoc, see base class AbstractConnPool
public void freeEntry(BasicPoolEntry entry) { @Override
public void freeEntry(BasicPoolEntry entry) {
HttpRoute route = entry.getPlannedRoute(); HttpRoute route = entry.getPlannedRoute();
if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) {
@ -494,7 +496,8 @@ public class ConnPoolByRoute extends AbstractConnPool {
// non-javadoc, see base class AbstractConnPool // non-javadoc, see base class AbstractConnPool
protected void handleLostEntry(HttpRoute route) { @Override
protected void handleLostEntry(HttpRoute route) {
try { try {
poolLock.lock(); poolLock.lock();
@ -566,7 +569,8 @@ public class ConnPoolByRoute extends AbstractConnPool {
//@@@ revise this cleanup stuff //@@@ revise this cleanup stuff
//@@@ move method to base class when deleteEntry() is fixed //@@@ move method to base class when deleteEntry() is fixed
// non-javadoc, see base class AbstractConnPool // non-javadoc, see base class AbstractConnPool
public void deleteClosedConnections() { @Override
public void deleteClosedConnections() {
try { try {
poolLock.lock(); poolLock.lock();
@ -587,7 +591,8 @@ public class ConnPoolByRoute extends AbstractConnPool {
// non-javadoc, see base class AbstractConnPool // non-javadoc, see base class AbstractConnPool
public void shutdown() { @Override
public void shutdown() {
try { try {
poolLock.lock(); poolLock.lock();

View File

@ -131,7 +131,8 @@ public class RefQueueWorker implements Runnable {
* *
* @return a descriptive string for this worker * @return a descriptive string for this worker
*/ */
public String toString() { @Override
public String toString() {
return "RefQueueWorker::" + this.workerThread; return "RefQueueWorker::" + this.workerThread;
} }

View File

@ -311,7 +311,8 @@ public class BasicClientCookie implements SetCookie, ClientCookie {
return this.attribs.get(name) != null; return this.attribs.get(name) != null;
} }
public String toString() { @Override
public String toString() {
StringBuilder buffer = new StringBuilder(); StringBuilder buffer = new StringBuilder();
buffer.append("[version: "); buffer.append("[version: ");
buffer.append(Integer.toString(this.cookieVersion)); buffer.append(Integer.toString(this.cookieVersion));

View File

@ -58,7 +58,8 @@ public class BasicClientCookie2 extends BasicClientCookie implements SetCookie2
super(name, value); super(name, value);
} }
public int[] getPorts() { @Override
public int[] getPorts() {
return this.ports; return this.ports;
} }
@ -66,7 +67,8 @@ public class BasicClientCookie2 extends BasicClientCookie implements SetCookie2
this.ports = ports; this.ports = ports;
} }
public String getCommentURL() { @Override
public String getCommentURL() {
return this.commentURL; return this.commentURL;
} }
@ -78,11 +80,13 @@ public class BasicClientCookie2 extends BasicClientCookie implements SetCookie2
this.discard = discard; this.discard = discard;
} }
public boolean isPersistent() { @Override
public boolean isPersistent() {
return !this.discard && super.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); return this.discard || super.isExpired(date);
} }

View File

@ -49,7 +49,8 @@ public class BasicSecureHandler extends AbstractCookieAttributeHandler {
cookie.setSecure(true); 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) { if (cookie == null) {
throw new IllegalArgumentException("Cookie may not be null"); throw new IllegalArgumentException("Cookie may not be null");
} }

View File

@ -216,7 +216,8 @@ public final class DateUtils {
private static final ThreadLocal<SoftReference<Map<String, SimpleDateFormat>>> private static final ThreadLocal<SoftReference<Map<String, SimpleDateFormat>>>
THREADLOCAL_FORMATS = new 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>>( return new SoftReference<Map<String, SimpleDateFormat>>(
new HashMap<String, SimpleDateFormat>()); new HashMap<String, SimpleDateFormat>());
} }

View File

@ -42,7 +42,8 @@ public class NetscapeDomainHandler extends BasicDomainHandler {
super(); super();
} }
public void validate(final Cookie cookie, final CookieOrigin origin) @Override
public void validate(final Cookie cookie, final CookieOrigin origin)
throws MalformedCookieException { throws MalformedCookieException {
super.validate(cookie, origin); super.validate(cookie, origin);
// Perform Netscape Cookie draft specific validation // Perform Netscape Cookie draft specific validation
@ -88,7 +89,8 @@ public class NetscapeDomainHandler extends BasicDomainHandler {
return false; return false;
} }
public boolean match(Cookie cookie, CookieOrigin origin) { @Override
public boolean match(Cookie cookie, CookieOrigin origin) {
if (cookie == null) { if (cookie == null) {
throw new IllegalArgumentException("Cookie may not be null"); throw new IllegalArgumentException("Cookie may not be null");
} }

View File

@ -112,6 +112,7 @@ public class RFC2109Spec extends CookieSpecBase {
return parse(elems, origin); return parse(elems, origin);
} }
@Override
public void validate(final Cookie cookie, final CookieOrigin origin) public void validate(final Cookie cookie, final CookieOrigin origin)
throws MalformedCookieException { throws MalformedCookieException {
if (cookie == null) { if (cookie == null) {

View File

@ -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 { throws MalformedCookieException {
if (cookie == null) { if (cookie == null) {
throw new IllegalArgumentException("Cookie may not be null"); throw new IllegalArgumentException("Cookie may not be null");

View File

@ -91,7 +91,8 @@ public class RFC2965Spec extends RFC2109Spec {
return cookie; return cookie;
} }
public List<Cookie> parse( @Override
public List<Cookie> parse(
final Header header, final Header header,
CookieOrigin origin) throws MalformedCookieException { CookieOrigin origin) throws MalformedCookieException {
if (header == null) { if (header == null) {
@ -149,7 +150,8 @@ public class RFC2965Spec extends RFC2109Spec {
return cookies; return cookies;
} }
public void validate(final Cookie cookie, CookieOrigin origin) @Override
public void validate(final Cookie cookie, CookieOrigin origin)
throws MalformedCookieException { throws MalformedCookieException {
if (cookie == null) { if (cookie == null) {
throw new IllegalArgumentException("Cookie may not be null"); throw new IllegalArgumentException("Cookie may not be null");
@ -161,7 +163,8 @@ public class RFC2965Spec extends RFC2109Spec {
super.validate(cookie, origin); super.validate(cookie, origin);
} }
public boolean match(final Cookie cookie, CookieOrigin origin) { @Override
public boolean match(final Cookie cookie, CookieOrigin origin) {
if (cookie == null) { if (cookie == null) {
throw new IllegalArgumentException("Cookie may not be 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" * 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) { final Cookie cookie, int version) {
super.formatCookieAsVer(buffer, cookie, version); super.formatCookieAsVer(buffer, cookie, version);
// format port attribute // format port attribute
@ -237,11 +241,13 @@ public class RFC2965Spec extends RFC2109Spec {
} }
} }
public int getVersion() { @Override
public int getVersion() {
return 1; return 1;
} }
public Header getVersionHeader() { @Override
public Header getVersionHeader() {
CharArrayBuffer buffer = new CharArrayBuffer(40); CharArrayBuffer buffer = new CharArrayBuffer(40);
buffer.append(SM.COOKIE2); buffer.append(SM.COOKIE2);
buffer.append(": "); buffer.append(": ");

View File

@ -89,7 +89,8 @@ public class ExecReqThread extends GetConnThread {
* This method is invoked when the thread is started. * This method is invoked when the thread is started.
* It invokes the base class implementation. * It invokes the base class implementation.
*/ */
public void run() { @Override
public void run() {
super.run(); // obtain connection super.run(); // obtain connection
if (connection == null) if (connection == null)
return; // problem obtaining connection return; // problem obtaining connection

View File

@ -68,7 +68,8 @@ public class GetConnThread extends Thread {
/** /**
* This method is executed when the thread is started. * This method is executed when the thread is started.
*/ */
public void run() { @Override
public void run() {
try { try {
connection = conn_manager.getConnection connection = conn_manager.getConnection
(conn_route, conn_timeout, TimeUnit.MILLISECONDS); (conn_route, conn_timeout, TimeUnit.MILLISECONDS);

View File

@ -63,7 +63,8 @@ public class AwaitThread extends Thread {
/** /**
* This method is executed when the thread is started. * This method is executed when the thread is started.
*/ */
public void run() { @Override
public void run() {
try { try {
wait_lock.lock(); wait_lock.lock();
waiting = true; waiting = true;

View File

@ -81,7 +81,8 @@ public class TestDumbHelpers extends TestCase {
} }
protected void setUp() { @Override
protected void setUp() {
supportedSchemes = new SchemeRegistry(); supportedSchemes = new SchemeRegistry();
SocketFactory sf = PlainSocketFactory.getSocketFactory(); SocketFactory sf = PlainSocketFactory.getSocketFactory();
supportedSchemes.register(new Scheme("http", sf, 80)); supportedSchemes.register(new Scheme("http", sf, 80));

View File

@ -252,7 +252,8 @@ public class LocalTestServer {
} }
public String toString() { @Override
public String toString() {
ServerSocket ssock = servicedSocket; // avoid synchronization ServerSocket ssock = servicedSocket; // avoid synchronization
StringBuffer sb = new StringBuffer(80); StringBuffer sb = new StringBuffer(80);
sb.append("LocalTestServer/"); sb.append("LocalTestServer/");

View File

@ -109,7 +109,8 @@ public abstract class ServerTestBase extends TestCase {
* *
* @throws Exception in case of a problem * @throws Exception in case of a problem
*/ */
protected void setUp() throws Exception { @Override
protected void setUp() throws Exception {
if (defaultParams == null) { if (defaultParams == null) {
defaultParams = new BasicHttpParams(); defaultParams = new BasicHttpParams();
@ -159,7 +160,8 @@ public abstract class ServerTestBase extends TestCase {
* *
* @see #setUp setUp() * @see #setUp setUp()
*/ */
protected void tearDown() throws Exception { @Override
protected void tearDown() throws Exception {
localServer.stop(); localServer.stop();
} }

View File

@ -51,7 +51,8 @@ public class SecureSocketFactoryMockup extends SocketFactoryMockup
// don't implement equals and hashcode, all instances are different! // don't implement equals and hashcode, all instances are different!
public String toString() { @Override
public String toString() {
return "SecureSocketFactoryMockup." + mockup_name; return "SecureSocketFactoryMockup." + mockup_name;
} }

View File

@ -57,7 +57,8 @@ public class SocketFactoryMockup implements SocketFactory {
// don't implement equals and hashcode, all instances are different! // don't implement equals and hashcode, all instances are different!
public String toString() { @Override
public String toString() {
return "SocketFactoryMockup." + mockup_name; return "SocketFactoryMockup." + mockup_name;
} }