hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1636723 - in /httpcomponents/httpcore/trunk: httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/ httpcore/src/main/java/org/apache/http/ httpcore/src/main/java/org/apache/http/config/ httpcore/src/main/java/org/apache/http/entity/...
Date Tue, 04 Nov 2014 20:04:59 GMT
Author: olegk
Date: Tue Nov  4 20:04:58 2014
New Revision: 1636723

URL: http://svn.apache.org/r1636723
Log:
Drop support for Cloneable interface

Modified:
    httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/IOReactorConfig.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpHost.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/ProtocolVersion.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/ConnectionConfig.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/MessageConstraints.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/SocketConfig.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ByteArrayEntity.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/FileEntity.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/StringEntity.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeader.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElement.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicNameValuePair.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicRequestLine.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicStatusLine.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BufferedHeader.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/HeaderGroup.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/TestHttpHost.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/TestHttpVersion.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestBufferedHeader.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestHeader.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestHeaderElement.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestHeaderGroup.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestNameValuePair.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestRequestLine.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestStatusLine.java

Modified: httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/IOReactorConfig.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/IOReactorConfig.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/IOReactorConfig.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore-nio/src/main/java/org/apache/http/impl/nio/reactor/IOReactorConfig.java
Tue Nov  4 20:04:58 2014
@@ -36,7 +36,7 @@ import org.apache.http.util.Args;
  * @since 4.2
  */
 @NotThreadSafe
-public final class IOReactorConfig implements Cloneable {
+public final class IOReactorConfig {
 
     private static final int AVAIL_PROCS = Runtime.getRuntime().availableProcessors();
 
@@ -233,11 +233,6 @@ public final class IOReactorConfig imple
         return backlogSize;
     }
 
-    @Override
-    protected IOReactorConfig clone() throws CloneNotSupportedException {
-        return (IOReactorConfig) super.clone();
-    }
-
     public static Builder custom() {
         return new Builder();
     }

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpHost.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpHost.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpHost.java (original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HttpHost.java Tue
Nov  4 20:04:58 2014
@@ -43,7 +43,7 @@ import org.apache.http.util.LangUtils;
  * @since 4.0
  */
 @Immutable
-public final class HttpHost implements Cloneable, Serializable {
+public final class HttpHost implements Serializable {
 
     private static final long serialVersionUID = -7529410654042457626L;
 
@@ -330,9 +330,4 @@ public final class HttpHost implements C
         return hash;
     }
 
-    @Override
-    public Object clone() throws CloneNotSupportedException {
-        return super.clone();
-    }
-
 }

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/ProtocolVersion.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/ProtocolVersion.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/ProtocolVersion.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/ProtocolVersion.java
Tue Nov  4 20:04:58 2014
@@ -45,7 +45,7 @@ import org.apache.http.util.Args;
  * @since 4.0
  */
 @Immutable
-public class ProtocolVersion implements Serializable, Cloneable {
+public class ProtocolVersion implements Serializable {
 
     private static final long serialVersionUID = 8950662842175091068L;
 
@@ -257,9 +257,4 @@ public class ProtocolVersion implements 
         return buffer.toString();
     }
 
-    @Override
-    public Object clone() throws CloneNotSupportedException {
-        return super.clone();
-    }
-
 }

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/ConnectionConfig.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/ConnectionConfig.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/ConnectionConfig.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/ConnectionConfig.java
Tue Nov  4 20:04:58 2014
@@ -40,7 +40,7 @@ import org.apache.http.util.Args;
  * @since 4.3
  */
 @Immutable
-public class ConnectionConfig implements Cloneable {
+public class ConnectionConfig {
 
     public static final ConnectionConfig DEFAULT = new Builder().build();
 
@@ -92,11 +92,6 @@ public class ConnectionConfig implements
     }
 
     @Override
-    protected ConnectionConfig clone() throws CloneNotSupportedException {
-        return (ConnectionConfig) super.clone();
-    }
-
-    @Override
     public String toString() {
         final StringBuilder builder = new StringBuilder();
         builder.append("[bufferSize=").append(this.bufferSize)

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/MessageConstraints.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/MessageConstraints.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/MessageConstraints.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/MessageConstraints.java
Tue Nov  4 20:04:58 2014
@@ -39,7 +39,7 @@ import org.apache.http.util.Args;
  *
  * @since 4.3
  */
-public class MessageConstraints implements Cloneable {
+public class MessageConstraints {
 
     public static final MessageConstraints DEFAULT = new Builder().build();
 
@@ -61,11 +61,6 @@ public class MessageConstraints implemen
     }
 
     @Override
-    protected MessageConstraints clone() throws CloneNotSupportedException {
-        return (MessageConstraints) super.clone();
-    }
-
-    @Override
     public String toString() {
         final StringBuilder builder = new StringBuilder();
         builder.append("[maxLineLength=").append(maxLineLength)

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/SocketConfig.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/SocketConfig.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/SocketConfig.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/config/SocketConfig.java
Tue Nov  4 20:04:58 2014
@@ -36,7 +36,7 @@ import org.apache.http.util.Args;
  * @since 4.3
  */
 @Immutable
-public class SocketConfig implements Cloneable {
+public class SocketConfig {
 
     public static final SocketConfig DEFAULT = new Builder().build();
 
@@ -182,11 +182,6 @@ public class SocketConfig implements Clo
     }
 
     @Override
-    protected SocketConfig clone() throws CloneNotSupportedException {
-        return (SocketConfig) super.clone();
-    }
-
-    @Override
     public String toString() {
         final StringBuilder builder = new StringBuilder();
         builder.append("[soTimeout=").append(this.soTimeout)

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ByteArrayEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ByteArrayEntity.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ByteArrayEntity.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/ByteArrayEntity.java
Tue Nov  4 20:04:58 2014
@@ -41,7 +41,7 @@ import org.apache.http.util.Args;
  * @since 4.0
  */
 @NotThreadSafe
-public class ByteArrayEntity extends AbstractHttpEntity implements Cloneable {
+public class ByteArrayEntity extends AbstractHttpEntity {
 
     private final byte[] b;
     private final int off, len;
@@ -119,9 +119,4 @@ public class ByteArrayEntity extends Abs
         return false;
     }
 
-    @Override
-    public Object clone() throws CloneNotSupportedException {
-        return super.clone();
-    }
-
 } // class ByteArrayEntity

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/FileEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/FileEntity.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/FileEntity.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/FileEntity.java
Tue Nov  4 20:04:58 2014
@@ -106,11 +106,4 @@ public class FileEntity extends Abstract
         return false;
     }
 
-    @Override
-    public Object clone() throws CloneNotSupportedException {
-        // File instance is considered immutable
-        // No need to make a copy of it
-        return super.clone();
-    }
-
 } // class FileEntity

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/StringEntity.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/StringEntity.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/StringEntity.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/entity/StringEntity.java
Tue Nov  4 20:04:58 2014
@@ -46,7 +46,7 @@ import org.apache.http.util.Args;
  * @since 4.0
  */
 @NotThreadSafe
-public class StringEntity extends AbstractHttpEntity implements Cloneable {
+public class StringEntity extends AbstractHttpEntity {
 
     protected final byte[] content;
 
@@ -154,9 +154,4 @@ public class StringEntity extends Abstra
         return false;
     }
 
-    @Override
-    public Object clone() throws CloneNotSupportedException {
-        return super.clone();
-    }
-
 } // class StringEntity

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeader.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeader.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeader.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeader.java
Tue Nov  4 20:04:58 2014
@@ -42,7 +42,7 @@ import org.apache.http.util.CharArrayBuf
  * @since 4.0
  */
 @Immutable
-public class BasicHeader implements Header, Cloneable, Serializable {
+public class BasicHeader implements Header, Serializable {
 
     private static final long serialVersionUID = -5427236326487562174L;
 
@@ -94,9 +94,4 @@ public class BasicHeader implements Head
         }
     }
 
-    @Override
-    public Object clone() throws CloneNotSupportedException {
-        return super.clone();
-    }
-
 }

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElement.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElement.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElement.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElement.java
Tue Nov  4 20:04:58 2014
@@ -39,7 +39,7 @@ import org.apache.http.util.LangUtils;
  * @since 4.0
  */
 @NotThreadSafe
-public class BasicHeaderElement implements HeaderElement, Cloneable {
+public class BasicHeaderElement implements HeaderElement {
 
     private final String name;
     private final String value;
@@ -157,12 +157,5 @@ public class BasicHeaderElement implemen
         return buffer.toString();
     }
 
-    @Override
-    public Object clone() throws CloneNotSupportedException {
-        // parameters array is considered immutable
-        // no need to make a copy of it
-        return super.clone();
-    }
-
 }
 

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicNameValuePair.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicNameValuePair.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicNameValuePair.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicNameValuePair.java
Tue Nov  4 20:04:58 2014
@@ -40,7 +40,7 @@ import org.apache.http.util.LangUtils;
  * @since 4.0
  */
 @Immutable
-public class BasicNameValuePair implements NameValuePair, Cloneable, Serializable {
+public class BasicNameValuePair implements NameValuePair, Serializable {
 
     private static final long serialVersionUID = -6437800749411518984L;
 
@@ -105,9 +105,4 @@ public class BasicNameValuePair implemen
         return hash;
     }
 
-    @Override
-    public Object clone() throws CloneNotSupportedException {
-        return super.clone();
-    }
-
 }

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicRequestLine.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicRequestLine.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicRequestLine.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicRequestLine.java
Tue Nov  4 20:04:58 2014
@@ -40,7 +40,7 @@ import org.apache.http.util.Args;
  * @since 4.0
  */
 @Immutable
-public class BasicRequestLine implements RequestLine, Cloneable, Serializable {
+public class BasicRequestLine implements RequestLine, Serializable {
 
     private static final long serialVersionUID = 2810581718468737193L;
 
@@ -79,9 +79,4 @@ public class BasicRequestLine implements
         return buf.toString();
     }
 
-    @Override
-    public Object clone() throws CloneNotSupportedException {
-        return super.clone();
-    }
-
 }

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicStatusLine.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicStatusLine.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicStatusLine.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicStatusLine.java
Tue Nov  4 20:04:58 2014
@@ -40,7 +40,7 @@ import org.apache.http.util.Args;
  * @since 4.0
  */
 @Immutable
-public class BasicStatusLine implements StatusLine, Cloneable, Serializable {
+public class BasicStatusLine implements StatusLine, Serializable {
 
     private static final long serialVersionUID = -2443303766890459269L;
 
@@ -99,9 +99,4 @@ public class BasicStatusLine implements 
         return buf.toString();
     }
 
-    @Override
-    public Object clone() throws CloneNotSupportedException {
-        return super.clone();
-    }
-
 }

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BufferedHeader.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BufferedHeader.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BufferedHeader.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BufferedHeader.java
Tue Nov  4 20:04:58 2014
@@ -43,7 +43,7 @@ import org.apache.http.util.CharArrayBuf
  * @since 4.0
  */
 @NotThreadSafe
-public class BufferedHeader implements FormattedHeader, Cloneable, Serializable {
+public class BufferedHeader implements FormattedHeader, Serializable {
 
     private static final long serialVersionUID = -2768352615787625448L;
 
@@ -120,11 +120,4 @@ public class BufferedHeader implements F
         return this.buffer.toString();
     }
 
-    @Override
-    public Object clone() throws CloneNotSupportedException {
-        // buffer is considered immutable
-        // no need to make a copy of it
-        return super.clone();
-    }
-
 }

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/HeaderGroup.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/HeaderGroup.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/HeaderGroup.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/HeaderGroup.java
Tue Nov  4 20:04:58 2014
@@ -47,7 +47,7 @@ import org.apache.http.util.CharArrayBuf
  * @since 4.0
  */
 @NotThreadSafe
-public class HeaderGroup implements Cloneable, Serializable {
+public class HeaderGroup implements Serializable {
 
     private static final long serialVersionUID = 2608834160639271617L;
 
@@ -299,11 +299,6 @@ public class HeaderGroup implements Clon
     }
 
     @Override
-    public Object clone() throws CloneNotSupportedException {
-        return super.clone();
-    }
-
-    @Override
     public String toString() {
         return this.headers.toString();
     }

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/TestHttpHost.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/TestHttpHost.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/TestHttpHost.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/TestHttpHost.java
Tue Nov  4 20:04:58 2014
@@ -177,13 +177,6 @@ public class TestHttpHost {
     }
 
     @Test
-    public void testCloning() throws Exception {
-        final HttpHost orig = new HttpHost("somehost", 8080, "https");
-        final HttpHost clone = (HttpHost) orig.clone();
-        Assert.assertEquals(orig, clone);
-    }
-
-    @Test
     public void testSerialization() throws Exception {
         final HttpHost orig = new HttpHost("somehost", 8080, "https");
         final ByteArrayOutputStream outbuffer = new ByteArrayOutputStream();

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/TestHttpVersion.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/TestHttpVersion.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/TestHttpVersion.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/TestHttpVersion.java
Tue Nov  4 20:04:58 2014
@@ -106,13 +106,6 @@ public class TestHttpVersion {
    }
 
     @Test
-    public void testCloning() throws Exception {
-        final HttpVersion orig = HttpVersion.HTTP_1_1;
-        final HttpVersion clone = (HttpVersion) orig.clone();
-        Assert.assertEquals(orig, clone);
-    }
-
-    @Test
     public void testSerialization() throws Exception {
         final HttpVersion orig = HttpVersion.HTTP_1_1;
         final ByteArrayOutputStream outbuffer = new ByteArrayOutputStream();

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestBufferedHeader.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestBufferedHeader.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestBufferedHeader.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestBufferedHeader.java
Tue Nov  4 20:04:58 2014
@@ -82,16 +82,6 @@ public class TestBufferedHeader {
     }
 
     @Test
-    public void testCloning() throws Exception {
-        final CharArrayBuffer buf = new CharArrayBuffer(32);
-        buf.append("name: value");
-        final BufferedHeader orig = new BufferedHeader(buf);
-        final BufferedHeader clone = (BufferedHeader) orig.clone();
-        Assert.assertEquals(orig.getName(), clone.getName());
-        Assert.assertEquals(orig.getValue(), clone.getValue());
-    }
-
-    @Test
     public void testSerialization() throws Exception {
         final CharArrayBuffer buf = new CharArrayBuffer(32);
         buf.append("name: value");

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestHeader.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestHeader.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestHeader.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestHeader.java
Tue Nov  4 20:04:58 2014
@@ -95,14 +95,6 @@ public class TestHeader {
     }
 
     @Test
-    public void testCloning() throws Exception {
-        final BasicHeader orig = new BasicHeader("name1", "value1");
-        final BasicHeader clone = (BasicHeader) orig.clone();
-        Assert.assertEquals(orig.getName(), clone.getName());
-        Assert.assertEquals(orig.getValue(), clone.getValue());
-    }
-
-    @Test
     public void testSerialization() throws Exception {
         final BasicHeader orig = new BasicHeader("name1", "value1");
         final ByteArrayOutputStream outbuffer = new ByteArrayOutputStream();

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestHeaderElement.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestHeaderElement.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestHeaderElement.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestHeaderElement.java
Tue Nov  4 20:04:58 2014
@@ -154,15 +154,4 @@ public class TestHeaderElement {
         Assert.assertEquals("name=value; param1=value1; param2=value2", element.toString());
     }
 
-    @Test
-    public void testCloning() throws Exception {
-        final BasicHeaderElement orig = new BasicHeaderElement("name", "value",
-                new NameValuePair[] {
-                    new BasicNameValuePair("param1", "value1"),
-                    new BasicNameValuePair("param2", "value2")
-                } );
-        final BasicHeaderElement clone = (BasicHeaderElement) orig.clone();
-        Assert.assertEquals(orig, clone);
-    }
-
 }

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestHeaderGroup.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestHeaderGroup.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestHeaderGroup.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestHeaderGroup.java
Tue Nov  4 20:04:58 2014
@@ -168,26 +168,6 @@ public class TestHeaderGroup {
     }
 
     @Test
-    public void testCloning() throws Exception {
-        final HeaderGroup orig = new HeaderGroup();
-        final Header header1 = new BasicHeader("name", "value1");
-        final Header header2 = new BasicHeader("name", "value2");
-        final Header header3 = new BasicHeader("name", "value3");
-        orig.setHeaders(new Header[] { header1, header2, header3 });
-        final HeaderGroup clone = (HeaderGroup) orig.clone();
-        final Header[] headers1 = orig.getAllHeaders();
-        final Header[] headers2 = clone.getAllHeaders();
-        Assert.assertNotNull(headers1);
-        Assert.assertNotNull(headers2);
-        Assert.assertEquals(3, headers2.length);
-        Assert.assertEquals(headers1.length, headers2.length);
-        for (int i = 0; i < headers1.length; i++) {
-            Assert.assertEquals(headers1[i].getName(), headers2[i].getName());
-            Assert.assertEquals(headers1[i].getValue(), headers2[i].getValue());
-        }
-    }
-
-    @Test
     public void testSerialization() throws Exception {
         final HeaderGroup orig = new HeaderGroup();
         final Header header1 = new BasicHeader("name", "value1");

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestNameValuePair.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestNameValuePair.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestNameValuePair.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestNameValuePair.java
Tue Nov  4 20:04:58 2014
@@ -84,11 +84,4 @@ public class TestNameValuePair {
         Assert.assertEquals("name1", param2.toString());
     }
 
-    @Test
-    public void testCloning() throws Exception {
-        final BasicNameValuePair orig = new BasicNameValuePair("name1", "value1");
-        final BasicNameValuePair clone = (BasicNameValuePair) orig.clone();
-        Assert.assertEquals(orig, clone);
-    }
-
 }

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestRequestLine.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestRequestLine.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestRequestLine.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestRequestLine.java
Tue Nov  4 20:04:58 2014
@@ -67,15 +67,6 @@ public class TestRequestLine {
     }
 
     @Test
-    public void testCloning() throws Exception {
-        final BasicRequestLine orig = new BasicRequestLine("GET", "/stuff", HttpVersion.HTTP_1_1);
-        final BasicRequestLine clone = (BasicRequestLine) orig.clone();
-        Assert.assertEquals(orig.getMethod(), clone.getMethod());
-        Assert.assertEquals(orig.getUri(), clone.getUri());
-        Assert.assertEquals(orig.getProtocolVersion(), clone.getProtocolVersion());
-    }
-
-    @Test
     public void testSerialization() throws Exception {
         final BasicRequestLine orig = new BasicRequestLine("GET", "/stuff", HttpVersion.HTTP_1_1);
         final ByteArrayOutputStream outbuffer = new ByteArrayOutputStream();

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestStatusLine.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestStatusLine.java?rev=1636723&r1=1636722&r2=1636723&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestStatusLine.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestStatusLine.java
Tue Nov  4 20:04:58 2014
@@ -73,15 +73,6 @@ public class TestStatusLine {
     }
 
     @Test
-    public void testCloning() throws Exception {
-        final BasicStatusLine orig = new BasicStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_OK,
"OK");
-        final BasicStatusLine clone = (BasicStatusLine) orig.clone();
-        Assert.assertEquals(orig.getReasonPhrase(), clone.getReasonPhrase());
-        Assert.assertEquals(orig.getStatusCode(), clone.getStatusCode());
-        Assert.assertEquals(orig.getProtocolVersion(), clone.getProtocolVersion());
-    }
-
-    @Test
     public void testSerialization() throws Exception {
         final BasicStatusLine orig = new BasicStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_OK,
"OK");
         final ByteArrayOutputStream outbuffer = new ByteArrayOutputStream();



Mime
View raw message