hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1407076 [2/2] - in /httpcomponents: contrib/httpcore/trunk/src/main/java/org/apache/http/contrib/compress/ contrib/httpcore/trunk/src/main/java/org/apache/http/contrib/logging/ httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache...
Date Thu, 08 Nov 2012 13:46:27 GMT
Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/testserver/LoggingBHttpClientConnection.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/testserver/LoggingBHttpClientConnection.java?rev=1407076&r1=1407075&r2=1407076&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/testserver/LoggingBHttpClientConnection.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/testserver/LoggingBHttpClientConnection.java
Thu Nov  8 13:46:24 2012
@@ -116,8 +116,8 @@ public class LoggingBHttpClientConnectio
         if (response != null && this.headerlog.isDebugEnabled()) {
             this.headerlog.debug(this.id + " << " + response.getStatusLine().toString());
             Header[] headers = response.getAllHeaders();
-            for (int i = 0; i < headers.length; i++) {
-                this.headerlog.debug(this.id + " << " + headers[i].toString());
+            for (Header header : headers) {
+                this.headerlog.debug(this.id + " << " + header.toString());
             }
         }
     }
@@ -127,8 +127,8 @@ public class LoggingBHttpClientConnectio
         if (request != null && this.headerlog.isDebugEnabled()) {
             this.headerlog.debug(id + " >> " + request.getRequestLine().toString());
             Header[] headers = request.getAllHeaders();
-            for (int i = 0; i < headers.length; i++) {
-                this.headerlog.debug(this.id + " >> " + headers[i].toString());
+            for (Header header : headers) {
+                this.headerlog.debug(this.id + " >> " + header.toString());
             }
         }
     }

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/testserver/LoggingBHttpServerConnection.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/testserver/LoggingBHttpServerConnection.java?rev=1407076&r1=1407075&r2=1407076&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/testserver/LoggingBHttpServerConnection.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/testserver/LoggingBHttpServerConnection.java
Thu Nov  8 13:46:24 2012
@@ -116,8 +116,8 @@ public class LoggingBHttpServerConnectio
         if (request != null && this.headerlog.isDebugEnabled()) {
             this.headerlog.debug(this.id + " >> " + request.getRequestLine().toString());
             Header[] headers = request.getAllHeaders();
-            for (int i = 0; i < headers.length; i++) {
-                this.headerlog.debug(this.id + " >> " + headers[i].toString());
+            for (Header header : headers) {
+                this.headerlog.debug(this.id + " >> " + header.toString());
             }
         }
     }
@@ -127,8 +127,8 @@ public class LoggingBHttpServerConnectio
         if (response != null && this.headerlog.isDebugEnabled()) {
             this.headerlog.debug(this.id + " << " + response.getStatusLine().toString());
             Header[] headers = response.getAllHeaders();
-            for (int i = 0; i < headers.length; i++) {
-                this.headerlog.debug(this.id + " << " + headers[i].toString());
+            for (Header header : headers) {
+                this.headerlog.debug(this.id + " << " + header.toString());
             }
         }
     }

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/util/TestByteArrayBuffer.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/util/TestByteArrayBuffer.java?rev=1407076&r1=1407075&r2=1407076&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/util/TestByteArrayBuffer.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/util/TestByteArrayBuffer.java
Thu Nov  8 13:46:24 2012
@@ -151,8 +151,8 @@ public class TestByteArrayBuffer {
         Assert.assertEquals(4, buffer.capacity());
 
         byte[] tmp = new byte[] { 1, 127, -1, -128, 1, -2};
-        for (int i = 0; i < tmp.length; i++) {
-            buffer.append(tmp[i]);
+        for (byte element : tmp) {
+            buffer.append(element);
         }
         Assert.assertEquals(8, buffer.capacity());
         Assert.assertEquals(6, buffer.length());

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/util/TestEncodingUtils.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/util/TestEncodingUtils.java?rev=1407076&r1=1407075&r2=1407076&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/util/TestEncodingUtils.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/util/TestEncodingUtils.java
Thu Nov  8 13:46:24 2012
@@ -39,8 +39,8 @@ public class TestEncodingUtils {
     private static String constructString(int [] unicodeChars) {
         StringBuilder buffer = new StringBuilder();
         if (unicodeChars != null) {
-            for (int i = 0; i < unicodeChars.length; i++) {
-                buffer.append((char)unicodeChars[i]);
+            for (int unicodeChar : unicodeChars) {
+                buffer.append((char)unicodeChar);
             }
         }
         return buffer.toString();

Modified: httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/util/TestEntityUtils.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/util/TestEntityUtils.java?rev=1407076&r1=1407075&r2=1407076&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/util/TestEntityUtils.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/test/java/org/apache/http/util/TestEntityUtils.java
Thu Nov  8 13:46:24 2012
@@ -163,8 +163,8 @@ public class TestEntityUtils {
     private static String constructString(int [] unicodeChars) {
         StringBuilder buffer = new StringBuilder();
         if (unicodeChars != null) {
-            for (int i = 0; i < unicodeChars.length; i++) {
-                buffer.append((char)unicodeChars[i]);
+            for (int unicodeChar : unicodeChars) {
+                buffer.append((char)unicodeChar);
             }
         }
         return buffer.toString();



Mime
View raw message