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