commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1553930 - /commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java
Date Sat, 28 Dec 2013 21:22:41 GMT
Author: ggregory
Date: Sat Dec 28 21:22:41 2013
New Revision: 1553930

URL: http://svn.apache.org/r1553930
Log:
Convert 'for' loops to enhanced 'for' loops.

Modified:
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java?rev=1553930&r1=1553929&r2=1553930&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/StringEscapeUtilsTest.java
Sat Dec 28 21:22:41 2013
@@ -219,10 +219,10 @@ public class StringEscapeUtilsTest {
 
     @Test
     public void testEscapeHtml() {
-        for (int i = 0; i < HTML_ESCAPES.length; ++i) {
-            final String message = HTML_ESCAPES[i][0];
-            final String expected = HTML_ESCAPES[i][1];
-            final String original = HTML_ESCAPES[i][2];
+        for (String[] element : HTML_ESCAPES) {
+            final String message = element[0];
+            final String expected = element[1];
+            final String original = element[2];
             assertEquals(message, expected, StringEscapeUtils.escapeHtml4(original));
             final StringWriter sw = new StringWriter();
             try {
@@ -236,10 +236,10 @@ public class StringEscapeUtilsTest {
 
     @Test
     public void testUnescapeHtml4() {
-        for (int i = 0; i < HTML_ESCAPES.length; ++i) {
-            final String message = HTML_ESCAPES[i][0];
-            final String expected = HTML_ESCAPES[i][2];
-            final String original = HTML_ESCAPES[i][1];
+        for (String[] element : HTML_ESCAPES) {
+            final String message = element[0];
+            final String expected = element[2];
+            final String original = element[1];
             assertEquals(message, expected, StringEscapeUtils.unescapeHtml4(original));
             
             final StringWriter sw = new StringWriter();



Mime
View raw message