harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r440576 - /incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/BatchUpdateExceptionTest.java
Date Wed, 06 Sep 2006 02:25:08 GMT
Author: smishura
Date: Tue Sep  5 19:25:08 2006
New Revision: 440576

URL: http://svn.apache.org/viewvc?view=rev&rev=440576
Log:
Change if+for -> Arrays.equals(): it checks null values, arrays' size and content

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/BatchUpdateExceptionTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/BatchUpdateExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/BatchUpdateExceptionTest.java?view=diff&rev=440576&r1=440575&r2=440576
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/BatchUpdateExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/BatchUpdateExceptionTest.java
Tue Sep  5 19:25:08 2006
@@ -17,11 +17,13 @@
 
 import java.io.Serializable;
 import java.sql.BatchUpdateException;
-import org.apache.harmony.testframework.serialization.SerializationTest;
-import org.apache.harmony.testframework.serialization.SerializationTest.SerializableAssert;
+import java.util.Arrays;
 
 import junit.framework.TestCase;
 
+import org.apache.harmony.testframework.serialization.SerializationTest;
+import org.apache.harmony.testframework.serialization.SerializationTest.SerializableAssert;
+
 public class BatchUpdateExceptionTest extends TestCase {
 
 	/*
@@ -360,13 +362,7 @@
             // verify updateCounts
             int[] initUpdateCounts = initThr.getUpdateCounts();
             int[] dserUpdateCounts = dserThr.getUpdateCounts();
-            if (initUpdateCounts == null) {
-                assertNull(dserUpdateCounts);
-            } else {
-                for (int i = 0; i < initUpdateCounts.length; i++) {
-                    assertEquals(initUpdateCounts[i], dserUpdateCounts[i]);
-                }
-            }
+            assertTrue(Arrays.equals(initUpdateCounts, dserUpdateCounts));
         }
     };
 



Mime
View raw message