"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient/src/main/java/org/apache/http/impl/conn/CPoolProxy.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.

CPoolProxy.java  (httpcomponents-client-4.5.6-src):CPoolProxy.java  (httpcomponents-client-4.5.7-src)
skipping to change at line 101 skipping to change at line 101
public void shutdown() throws IOException { public void shutdown() throws IOException {
final CPoolEntry local = this.poolEntry; final CPoolEntry local = this.poolEntry;
if (local != null) { if (local != null) {
local.shutdownConnection(); local.shutdownConnection();
} }
} }
@Override @Override
public boolean isOpen() { public boolean isOpen() {
final CPoolEntry local = this.poolEntry; final CPoolEntry local = this.poolEntry;
if (local != null) { return local != null ? !local.isClosed() : false;
return !local.isClosed();
} else {
return false;
}
} }
@Override @Override
public boolean isStale() { public boolean isStale() {
final HttpClientConnection conn = getConnection(); final HttpClientConnection conn = getConnection();
if (conn != null) { return conn != null ? conn.isStale() : true;
return conn.isStale();
} else {
return true;
}
} }
@Override @Override
public void setSocketTimeout(final int timeout) { public void setSocketTimeout(final int timeout) {
getValidConnection().setSocketTimeout(timeout); getValidConnection().setSocketTimeout(timeout);
} }
@Override @Override
public int getSocketTimeout() { public int getSocketTimeout() {
return getValidConnection().getSocketTimeout(); return getValidConnection().getSocketTimeout();
skipping to change at line 206 skipping to change at line 198
} }
@Override @Override
public int getRemotePort() { public int getRemotePort() {
return getValidConnection().getRemotePort(); return getValidConnection().getRemotePort();
} }
@Override @Override
public Object getAttribute(final String id) { public Object getAttribute(final String id) {
final ManagedHttpClientConnection conn = getValidConnection(); final ManagedHttpClientConnection conn = getValidConnection();
if (conn instanceof HttpContext) { return conn instanceof HttpContext ? ((HttpContext) conn).getAttribute(i
return ((HttpContext) conn).getAttribute(id); d) : null;
} else {
return null;
}
} }
@Override @Override
public void setAttribute(final String id, final Object obj) { public void setAttribute(final String id, final Object obj) {
final ManagedHttpClientConnection conn = getValidConnection(); final ManagedHttpClientConnection conn = getValidConnection();
if (conn instanceof HttpContext) { if (conn instanceof HttpContext) {
((HttpContext) conn).setAttribute(id, obj); ((HttpContext) conn).setAttribute(id, obj);
} }
} }
@Override @Override
public Object removeAttribute(final String id) { public Object removeAttribute(final String id) {
final ManagedHttpClientConnection conn = getValidConnection(); final ManagedHttpClientConnection conn = getValidConnection();
if (conn instanceof HttpContext) { return conn instanceof HttpContext ? ((HttpContext) conn).removeAttribut
return ((HttpContext) conn).removeAttribute(id); e(id) : null;
} else {
return null;
}
} }
@Override @Override
public String toString() { public String toString() {
final StringBuilder sb = new StringBuilder("CPoolProxy{"); final StringBuilder sb = new StringBuilder("CPoolProxy{");
final ManagedHttpClientConnection conn = getConnection(); final ManagedHttpClientConnection conn = getConnection();
if (conn != null) { if (conn != null) {
sb.append(conn); sb.append(conn);
} else { } else {
sb.append("detached"); sb.append("detached");
 End of changes. 4 change blocks. 
20 lines changed or deleted 6 lines changed or added

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