HttpRequestBase extends AbstractHttpMessage implements HttpUriRequest, AbortableHttpRequest, Cloneable { @Override public Object clone() throws CloneNotSupportedException { HttpRequestBase clone = (HttpRequestBase) super.clone(); clone.abortLock = new ReentrantLock(); clone.aborted = false; clone.releaseTrigger = null; clone.connRequest = null; clone.headergroup = (HeaderGroup) CloneUtils.clone(this.headergroup); clone.params = (HttpParams) CloneUtils.clone(this.params); return clone; } HttpRequestBase(); abstract String getMethod(); ProtocolVersion getProtocolVersion(); URI getURI(); RequestLine getRequestLine(); void setURI(final URI uri); void setConnectionRequest(final ClientConnectionRequest connRequest); void setReleaseTrigger(final ConnectionReleaseTrigger releaseTrigger); void abort(); boolean isAborted(); @Override Object clone();  }
@Test(expected=CloneNotSupportedException.class) public void testCloneStreamingEntityEnclosingRequests() throws Exception { ByteArrayInputStream instream = new ByteArrayInputStream(new byte[] {}); InputStreamEntity e2 = new InputStreamEntity(instream, -1); HttpPost httppost = new HttpPost("http: httppost.setEntity(e2); httppost.clone(); }