hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1329846 - in /httpcomponents/httpcore/trunk: httpcore-contrib/ httpcore/src/main/java/org/apache/http/ httpcore/src/main/java/org/apache/http/impl/ httpcore/src/main/java/org/apache/http/impl/io/ httpcore/src/main/java/org/apache/http/mess...
Date Tue, 24 Apr 2012 16:53:07 GMT
Author: olegk
Date: Tue Apr 24 16:53:06 2012
New Revision: 1329846

URL: http://svn.apache.org/viewvc?rev=1329846&view=rev
Log:
Restored binary compatibility with 4.1 of all non-deprecated methods

Added:
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpRequestParser.java
      - copied, changed from r1329776, httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpRequestParser.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpResponseParser.java
      - copied, changed from r1329776, httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpResponseParser.java
Modified:
    httpcomponents/httpcore/trunk/httpcore-contrib/pom.xml
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HeaderElementIterator.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HeaderIterator.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/TokenIterator.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/AbstractHttpClientConnection.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/AbstractHttpServerConnection.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageWriter.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpRequestParser.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpResponseParser.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/AbstractHttpMessage.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElementIterator.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderIterator.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicListHeaderIterator.java
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicTokenIterator.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestRequestParser.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestResponseParser.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestBasicHeaderElementIterator.java
    httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestHeaderGroup.java

Modified: httpcomponents/httpcore/trunk/httpcore-contrib/pom.xml
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore-contrib/pom.xml?rev=1329846&r1=1329845&r2=1329846&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore-contrib/pom.xml (original)
+++ httpcomponents/httpcore/trunk/httpcore-contrib/pom.xml Tue Apr 24 16:53:06 2012
@@ -27,9 +27,13 @@
 
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.httpcomponents</groupId>
+    <artifactId>httpcomponents-core</artifactId>
+    <version>4.2-beta2-SNAPSHOT</version>
+  </parent>
   <artifactId>httpcore-contrib</artifactId>
   <name>HttpCore Contrib</name>
-  <version>SNAPSHOT</version>
   <description>
    HttpComponents HttpCore - Contributed Components (distributed as source only)
   </description>

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HeaderElementIterator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HeaderElementIterator.java?rev=1329846&r1=1329845&r2=1329846&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HeaderElementIterator.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HeaderElementIterator.java
Tue Apr 24 16:53:06 2012
@@ -34,7 +34,7 @@ import java.util.Iterator;
  *
  * @since 4.0
  */
-public interface HeaderElementIterator extends Iterator<HeaderElement> {
+public interface HeaderElementIterator extends Iterator<Object> {
 
     /**
      * Indicates whether there is another header element in this

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HeaderIterator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HeaderIterator.java?rev=1329846&r1=1329845&r2=1329846&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HeaderIterator.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/HeaderIterator.java
Tue Apr 24 16:53:06 2012
@@ -34,7 +34,7 @@ import java.util.Iterator;
  *
  * @since 4.0
  */
-public interface HeaderIterator extends Iterator<Header> {
+public interface HeaderIterator extends Iterator<Object> {
 
     /**
      * Indicates whether there is another header in this iteration.

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/TokenIterator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/TokenIterator.java?rev=1329846&r1=1329845&r2=1329846&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/TokenIterator.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/TokenIterator.java
Tue Apr 24 16:53:06 2012
@@ -37,7 +37,7 @@ import java.util.Iterator;
  *
  * @since 4.0
  */
-public interface TokenIterator extends Iterator<String> {
+public interface TokenIterator extends Iterator<Object> {
 
     /**
      * Indicates whether there is another token in this iteration.

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/AbstractHttpClientConnection.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/AbstractHttpClientConnection.java?rev=1329846&r1=1329845&r2=1329846&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/AbstractHttpClientConnection.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/AbstractHttpClientConnection.java
Tue Apr 24 16:53:06 2012
@@ -44,6 +44,7 @@ import org.apache.http.impl.entity.Entit
 import org.apache.http.impl.entity.EntitySerializer;
 import org.apache.http.impl.entity.LaxContentLengthStrategy;
 import org.apache.http.impl.entity.StrictContentLengthStrategy;
+import org.apache.http.impl.io.DefaultHttpResponseParser;
 import org.apache.http.impl.io.HttpRequestWriter;
 import org.apache.http.impl.io.HttpResponseParser;
 import org.apache.http.io.EofSensor;
@@ -167,7 +168,7 @@ public abstract class AbstractHttpClient
             final SessionInputBuffer buffer,
             final HttpResponseFactory responseFactory,
             final HttpParams params) {
-        return new HttpResponseParser(buffer, null, responseFactory, params);
+        return new DefaultHttpResponseParser(buffer, null, responseFactory, params);
     }
 
     /**

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/AbstractHttpServerConnection.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/AbstractHttpServerConnection.java?rev=1329846&r1=1329845&r2=1329846&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/AbstractHttpServerConnection.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/AbstractHttpServerConnection.java
Tue Apr 24 16:53:06 2012
@@ -44,6 +44,7 @@ import org.apache.http.impl.entity.Entit
 import org.apache.http.impl.entity.EntitySerializer;
 import org.apache.http.impl.entity.LaxContentLengthStrategy;
 import org.apache.http.impl.entity.StrictContentLengthStrategy;
+import org.apache.http.impl.io.DefaultHttpRequestParser;
 import org.apache.http.impl.io.HttpRequestParser;
 import org.apache.http.impl.io.HttpResponseWriter;
 import org.apache.http.io.EofSensor;
@@ -168,7 +169,7 @@ public abstract class AbstractHttpServer
             final SessionInputBuffer buffer,
             final HttpRequestFactory requestFactory,
             final HttpParams params) {
-        return new HttpRequestParser(buffer, null, requestFactory, params);
+        return new DefaultHttpRequestParser(buffer, null, requestFactory, params);
     }
 
     /**

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageWriter.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageWriter.java?rev=1329846&r1=1329845&r2=1329846&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageWriter.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageWriter.java
Tue Apr 24 16:53:06 2012
@@ -28,9 +28,9 @@
 package org.apache.http.impl.io;
 
 import java.io.IOException;
-import java.util.Iterator;
 
 import org.apache.http.Header;
+import org.apache.http.HeaderIterator;
 import org.apache.http.HttpException;
 import org.apache.http.HttpMessage;
 import org.apache.http.annotation.NotThreadSafe;
@@ -88,8 +88,8 @@ public abstract class AbstractMessageWri
             throw new IllegalArgumentException("HTTP message may not be null");
         }
         writeHeadLine(message);
-        for (Iterator<Header> it = message.headerIterator(); it.hasNext(); ) {
-            Header header = it.next();
+        for (HeaderIterator it = message.headerIterator(); it.hasNext(); ) {
+            Header header = it.nextHeader();
             this.sessionBuffer.writeLine
                 (lineFormatter.formatHeader(this.lineBuf, header));
         }

Copied: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpRequestParser.java
(from r1329776, httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpRequestParser.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpRequestParser.java?p2=httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpRequestParser.java&p1=httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpRequestParser.java&r1=1329776&r2=1329846&rev=1329846&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpRequestParser.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpRequestParser.java
Tue Apr 24 16:53:06 2012
@@ -53,10 +53,10 @@ import org.apache.http.util.CharArrayBuf
  *  <li>{@link org.apache.http.params.CoreConnectionPNames#MAX_LINE_LENGTH}</li>
  * </ul>
  *
- * @since 4.0
+ * @since 4.2
  */
 @NotThreadSafe
-public class HttpRequestParser extends AbstractMessageParser<HttpRequest> {
+public class DefaultHttpRequestParser extends AbstractMessageParser<HttpRequest> {
 
     private final HttpRequestFactory requestFactory;
     private final CharArrayBuffer lineBuf;
@@ -70,7 +70,7 @@ public class HttpRequestParser extends A
      *    {@link HttpRequest}s.
      * @param params HTTP parameters.
      */
-    public HttpRequestParser(
+    public DefaultHttpRequestParser(
             final SessionInputBuffer buffer,
             final LineParser parser,
             final HttpRequestFactory requestFactory,

Copied: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpResponseParser.java
(from r1329776, httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpResponseParser.java)
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpResponseParser.java?p2=httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpResponseParser.java&p1=httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpResponseParser.java&r1=1329776&r2=1329846&rev=1329846&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpResponseParser.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/DefaultHttpResponseParser.java
Tue Apr 24 16:53:06 2012
@@ -53,10 +53,10 @@ import org.apache.http.util.CharArrayBuf
  *  <li>{@link org.apache.http.params.CoreConnectionPNames#MAX_LINE_LENGTH}</li>
  * </ul>
  *
- * @since 4.0
+ * @since 4.2
  */
 @NotThreadSafe
-public class HttpResponseParser extends AbstractMessageParser<HttpResponse> {
+public class DefaultHttpResponseParser extends AbstractMessageParser<HttpResponse>
{
 
     private final HttpResponseFactory responseFactory;
     private final CharArrayBuffer lineBuf;
@@ -70,7 +70,7 @@ public class HttpResponseParser extends 
      *    {@link HttpResponse}s.
      * @param params HTTP parameters.
      */
-    public HttpResponseParser(
+    public DefaultHttpResponseParser(
             final SessionInputBuffer buffer,
             final LineParser parser,
             final HttpResponseFactory responseFactory,

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpRequestParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpRequestParser.java?rev=1329846&r1=1329845&r2=1329846&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpRequestParser.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpRequestParser.java
Tue Apr 24 16:53:06 2012
@@ -31,6 +31,7 @@ import java.io.IOException;
 
 import org.apache.http.ConnectionClosedException;
 import org.apache.http.HttpException;
+import org.apache.http.HttpMessage;
 import org.apache.http.HttpRequest;
 import org.apache.http.HttpRequestFactory;
 import org.apache.http.RequestLine;
@@ -56,7 +57,7 @@ import org.apache.http.util.CharArrayBuf
  * @since 4.0
  */
 @NotThreadSafe
-public class HttpRequestParser extends AbstractMessageParser<HttpRequest> {
+public class HttpRequestParser extends AbstractMessageParser<HttpMessage> {
 
     private final HttpRequestFactory requestFactory;
     private final CharArrayBuffer lineBuf;
@@ -84,7 +85,7 @@ public class HttpRequestParser extends A
     }
 
     @Override
-    protected HttpRequest parseHead(
+    protected HttpMessage parseHead(
             final SessionInputBuffer sessionBuffer)
         throws IOException, HttpException, ParseException {
 

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpResponseParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpResponseParser.java?rev=1329846&r1=1329845&r2=1329846&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpResponseParser.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/HttpResponseParser.java
Tue Apr 24 16:53:06 2012
@@ -30,6 +30,7 @@ package org.apache.http.impl.io;
 import java.io.IOException;
 
 import org.apache.http.HttpException;
+import org.apache.http.HttpMessage;
 import org.apache.http.HttpResponse;
 import org.apache.http.HttpResponseFactory;
 import org.apache.http.NoHttpResponseException;
@@ -56,7 +57,7 @@ import org.apache.http.util.CharArrayBuf
  * @since 4.0
  */
 @NotThreadSafe
-public class HttpResponseParser extends AbstractMessageParser<HttpResponse> {
+public class HttpResponseParser extends AbstractMessageParser<HttpMessage> {
 
     private final HttpResponseFactory responseFactory;
     private final CharArrayBuffer lineBuf;
@@ -84,7 +85,7 @@ public class HttpResponseParser extends 
     }
 
     @Override
-    protected HttpResponse parseHead(
+    protected HttpMessage parseHead(
             final SessionInputBuffer sessionBuffer)
         throws IOException, HttpException, ParseException {
 

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/AbstractHttpMessage.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/AbstractHttpMessage.java?rev=1329846&r1=1329845&r2=1329846&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/AbstractHttpMessage.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/AbstractHttpMessage.java
Tue Apr 24 16:53:06 2012
@@ -27,8 +27,6 @@
 
 package org.apache.http.message;
 
-import java.util.Iterator;
-
 import org.apache.http.Header;
 import org.apache.http.HeaderIterator;
 import org.apache.http.HttpMessage;
@@ -124,8 +122,8 @@ public abstract class AbstractHttpMessag
         if (name == null) {
             return;
         }
-        for (Iterator<Header> i = this.headergroup.iterator(); i.hasNext(); ) {
-            Header header = i.next();
+        for (HeaderIterator i = this.headergroup.iterator(); i.hasNext(); ) {
+            Header header = i.nextHeader();
             if (name.equalsIgnoreCase(header.getName())) {
                 i.remove();
             }

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElementIterator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElementIterator.java?rev=1329846&r1=1329845&r2=1329846&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElementIterator.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderElementIterator.java
Tue Apr 24 16:53:06 2012
@@ -145,7 +145,7 @@ public class BasicHeaderElementIterator 
         return element;
     }
 
-    public final HeaderElement next() throws NoSuchElementException {
+    public final Object next() throws NoSuchElementException {
         return nextElement();
     }
 

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderIterator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderIterator.java?rev=1329846&r1=1329845&r2=1329846&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderIterator.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicHeaderIterator.java
Tue Apr 24 16:53:06 2012
@@ -156,7 +156,7 @@ public class BasicHeaderIterator impleme
      *
      * @throws NoSuchElementException   if there are no more headers
      */
-    public final Header next()
+    public final Object next()
         throws NoSuchElementException {
         return nextHeader();
     }

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicListHeaderIterator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicListHeaderIterator.java?rev=1329846&r1=1329845&r2=1329846&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicListHeaderIterator.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicListHeaderIterator.java
Tue Apr 24 16:53:06 2012
@@ -170,7 +170,7 @@ public class BasicListHeaderIterator imp
      *
      * @throws NoSuchElementException   if there are no more headers
      */
-    public final Header next()
+    public final Object next()
         throws NoSuchElementException {
         return nextHeader();
     }

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicTokenIterator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicTokenIterator.java?rev=1329846&r1=1329845&r2=1329846&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicTokenIterator.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/message/BasicTokenIterator.java
Tue Apr 24 16:53:06 2012
@@ -128,7 +128,7 @@ public class BasicTokenIterator implemen
      * @throws NoSuchElementException   if there are no more tokens
      * @throws ParseException   if an invalid header value is encountered
      */
-    public final String next()
+    public final Object next()
         throws NoSuchElementException, ParseException {
         return nextToken();
     }

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestRequestParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestRequestParser.java?rev=1329846&r1=1329845&r2=1329846&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestRequestParser.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestRequestParser.java
Tue Apr 24 16:53:06 2012
@@ -97,7 +97,7 @@ public class TestRequestParser {
             "\r\n";
         SessionInputBuffer inbuffer = new SessionInputBufferMock(s, "US-ASCII");
 
-        HttpRequestParser parser = new HttpRequestParser(
+        DefaultHttpRequestParser parser = new DefaultHttpRequestParser(
                 inbuffer,
                 BasicLineParser.DEFAULT,
                 new DefaultHttpRequestFactory(),
@@ -142,7 +142,7 @@ public class TestRequestParser {
         SessionInputBuffer inbuffer = new SessionInputBufferMock(
                 new TimeoutByteArrayInputStream(s.getBytes("US-ASCII")), 16);
 
-        HttpRequestParser parser = new HttpRequestParser(
+        DefaultHttpRequestParser parser = new DefaultHttpRequestParser(
                 inbuffer,
                 BasicLineParser.DEFAULT,
                 new DefaultHttpRequestFactory(),

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestResponseParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestResponseParser.java?rev=1329846&r1=1329845&r2=1329846&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestResponseParser.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/impl/io/TestResponseParser.java
Tue Apr 24 16:53:06 2012
@@ -93,7 +93,7 @@ public class TestResponseParser {
             "\r\n";
         SessionInputBuffer inbuffer = new SessionInputBufferMock(s, "US-ASCII");
 
-        HttpResponseParser parser = new HttpResponseParser(
+        DefaultHttpResponseParser parser = new DefaultHttpResponseParser(
                 inbuffer,
                 BasicLineParser.DEFAULT,
                 new DefaultHttpResponseFactory(),
@@ -138,7 +138,7 @@ public class TestResponseParser {
         SessionInputBuffer inbuffer = new SessionInputBufferMock(
                 new TimeoutByteArrayInputStream(s.getBytes("US-ASCII")), 16);
 
-        HttpResponseParser parser = new HttpResponseParser(
+        DefaultHttpResponseParser parser = new DefaultHttpResponseParser(
                 inbuffer,
                 BasicLineParser.DEFAULT,
                 new DefaultHttpResponseFactory(),

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestBasicHeaderElementIterator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestBasicHeaderElementIterator.java?rev=1329846&r1=1329845&r2=1329846&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestBasicHeaderElementIterator.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/message/TestBasicHeaderElementIterator.java
Tue Apr 24 16:53:06 2012
@@ -53,12 +53,12 @@ public class TestBasicHeaderElementItera
                         new BasicHeaderIterator(headers, "Name"));
 
         Assert.assertTrue(hei.hasNext());
-        HeaderElement elem = hei.next();
+        HeaderElement elem = hei.nextElement();
         Assert.assertEquals("The two header values must be equal",
                 "value0", elem.getName());
 
         Assert.assertTrue(hei.hasNext());
-        elem = hei.next();
+        elem = hei.nextElement();
         Assert.assertEquals("The two header values must be equal",
                 "value1", elem.getName());
 
@@ -89,19 +89,19 @@ public class TestBasicHeaderElementItera
         HeaderElementIterator hei =
                 new BasicHeaderElementIterator(new BasicHeaderIterator(headers, "Name"));
 
-        HeaderElement elem = hei.next();
+        HeaderElement elem = hei.nextElement();
         Assert.assertEquals("The two header values must be equal",
                 "value0", elem.getName());
-        elem = hei.next();
+        elem = hei.nextElement();
         Assert.assertEquals("The two header values must be equal",
                 "value1", elem.getName());
-        elem = hei.next();
+        elem = hei.nextElement();
         Assert.assertEquals("The two header values must be equal",
                 "cookie1", elem.getName());
         Assert.assertEquals("The two header values must be equal",
                 "1", elem.getValue());
 
-        elem = hei.next();
+        elem = hei.nextElement();
         Assert.assertEquals("The two header values must be equal",
                 "cookie2", elem.getName());
         Assert.assertEquals("The two header values must be equal",

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=1329846&r1=1329845&r2=1329846&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 Apr 24 16:53:06 2012
@@ -31,9 +31,9 @@ import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
-import java.util.Iterator;
 
 import org.apache.http.Header;
+import org.apache.http.HeaderIterator;
 import org.junit.Assert;
 import org.junit.Test;
 
@@ -140,7 +140,7 @@ public class TestHeaderGroup {
     @Test
     public void testIterator() {
         HeaderGroup headergroup = new HeaderGroup();
-        Iterator<Header> i = headergroup.iterator();
+        HeaderIterator i = headergroup.iterator();
         Assert.assertNotNull(i);
         Assert.assertFalse(i.hasNext());
     }
@@ -152,7 +152,7 @@ public class TestHeaderGroup {
         Header header2 = new BasicHeader("name", "value2");
         Header header3 = new BasicHeader("name", "value3");
         headergroup.setHeaders(new Header[] { header1, header2, header3 });
-        Iterator<Header> i = headergroup.iterator();
+        HeaderIterator i = headergroup.iterator();
         Assert.assertNotNull(i);
         Assert.assertTrue(i.hasNext());
         i.next();



Mime
View raw message