[libpostgresql-jdbc-java] 03/06: Ugggh, compiling is not the same as working. Junit's assertEquals converts things to strings which doesn't work for arrays. Use Arrays.equals instead.

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon Jan 9 10:19:35 UTC 2017


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to tag REL8_0_321
in repository libpostgresql-jdbc-java.

commit 5209050d61b2f2927f9b07d55ac536412a36b73b
Author: Kris Jurka <books at ejurka.com>
Date:   Wed Nov 14 03:18:20 2007 +0000

    Ugggh, compiling is not the same as working.  Junit's assertEquals
    converts things to strings which doesn't work for arrays.  Use
    Arrays.equals instead.
---
 org/postgresql/test/jdbc2/UpdateableResultTest.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/org/postgresql/test/jdbc2/UpdateableResultTest.java b/org/postgresql/test/jdbc2/UpdateableResultTest.java
index d20880f..5ea48d3 100644
--- a/org/postgresql/test/jdbc2/UpdateableResultTest.java
+++ b/org/postgresql/test/jdbc2/UpdateableResultTest.java
@@ -250,21 +250,21 @@ public class UpdateableResultTest extends TestCase
         assertEquals(2, rs.getInt(1));
         assertEquals(string, rs.getString(2));
         assertEquals(string, rs.getString(3));
-        assertEquals(bytes, rs.getBytes(4));
+        assertTrue(Arrays.equals(bytes, rs.getBytes(4)));
 
         rs.refreshRow();
 
         assertEquals(2, rs.getInt(1));
         assertEquals(string, rs.getString(2));
         assertEquals(string, rs.getString(3));
-        assertEquals(bytes, rs.getBytes(4));
+        assertTrue(Arrays.equals(bytes, rs.getBytes(4)));
 
         rs.next();
 
         assertEquals(3, rs.getInt(1));
         assertEquals(string, rs.getString(2));
         assertEquals(string, rs.getString(3));
-        assertEquals(bytes, rs.getBytes(4));
+        assertTrue(Arrays.equals(bytes, rs.getBytes(4)));
         
         rs.close();
         stmt.close();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libpostgresql-jdbc-java.git



More information about the pkg-java-commits mailing list