db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r566290 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/Utilities.java
Date Wed, 15 Aug 2007 18:20:00 GMT
Author: kmarsden
Date: Wed Aug 15 11:20:00 2007
New Revision: 566290

URL: http://svn.apache.org/viewvc?view=rev&rev=566290
Log:
fix showResultSet for null values


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/Utilities.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/Utilities.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/Utilities.java?view=diff&rev=566290&r1=566289&r2=566290
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/Utilities.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/Utilities.java Wed Aug
15 11:20:00 2007
@@ -123,7 +123,11 @@
                 
                 for (int i = 0; i < nocols; i++)
                 {
-                    System.out.print("\"" + rs.getString(i+1) + "\"");
+                	String val = rs.getString(i+1);
+                	if (val == null)
+                		System.out.print("null");
+                	else
+                		System.out.print("\"" + rs.getString(i+1) + "\"");
                     if (i == (nocols -1))
                         System.out.print("}");
                     else
@@ -135,7 +139,7 @@
                 if (next)
                     System.out.println(",");
                 else
-                    System.out.println("};");
+                    System.out.println("};\n");
             }
         }       
 



Mime
View raw message