"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient/src/main/java/org/apache/http/conn/scheme/Scheme.java" between
httpcomponents-client-4.5.6-src.tar.gz and httpcomponents-client-4.5.7-src.tar.gz

About: HttpComponents is an Apache project responsible for creating and maintaining a toolset of low level Java components focused on HTTP and associated protocols. Java sources.

Scheme.java  (httpcomponents-client-4.5.6-src):Scheme.java  (httpcomponents-client-4.5.7-src)
skipping to change at line 165 skipping to change at line 165
* {@link LayeredSocketFactory LayeredSocketFactory}. * {@link LayeredSocketFactory LayeredSocketFactory}.
* *
* @return the socket factory for this scheme * @return the socket factory for this scheme
* *
* @deprecated (4.1) Use {@link #getSchemeSocketFactory()} * @deprecated (4.1) Use {@link #getSchemeSocketFactory()}
*/ */
@Deprecated @Deprecated
public final SocketFactory getSocketFactory() { public final SocketFactory getSocketFactory() {
if (this.socketFactory instanceof SchemeSocketFactoryAdaptor) { if (this.socketFactory instanceof SchemeSocketFactoryAdaptor) {
return ((SchemeSocketFactoryAdaptor) this.socketFactory).getFactory( ); return ((SchemeSocketFactoryAdaptor) this.socketFactory).getFactory( );
} else {
if (this.layered) {
return new LayeredSocketFactoryAdaptor(
(LayeredSchemeSocketFactory) this.socketFactory);
} else {
return new SocketFactoryAdaptor(this.socketFactory);
}
} }
return this.layered
? new LayeredSocketFactoryAdaptor(
(LayeredSchemeSocketFactory) this.socket
Factory)
: new SocketFactoryAdaptor(this.socketFactory);
} }
/** /**
* Obtains the socket factory. * Obtains the socket factory.
* If this scheme is {@link #isLayered layered}, the factory implements * If this scheme is {@link #isLayered layered}, the factory implements
* {@link LayeredSocketFactory LayeredSchemeSocketFactory}. * {@link LayeredSocketFactory LayeredSchemeSocketFactory}.
* *
* @return the socket factory for this scheme * @return the socket factory for this scheme
* *
* @since 4.1 * @since 4.1
skipping to change at line 247 skipping to change at line 244
@Override @Override
public final boolean equals(final Object obj) { public final boolean equals(final Object obj) {
if (this == obj) { if (this == obj) {
return true; return true;
} }
if (obj instanceof Scheme) { if (obj instanceof Scheme) {
final Scheme that = (Scheme) obj; final Scheme that = (Scheme) obj;
return this.name.equals(that.name) return this.name.equals(that.name)
&& this.defaultPort == that.defaultPort && this.defaultPort == that.defaultPort
&& this.layered == that.layered; && this.layered == that.layered;
} else {
return false;
} }
return false;
} }
@Override @Override
public int hashCode() { 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);
hash = LangUtils.hashCode(hash, this.layered); hash = LangUtils.hashCode(hash, this.layered);
return hash; return hash;
} }
 End of changes. 4 change blocks. 
9 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)