Permalink
Browse files

fix test case to actually check the value

don't mask the exception in the event that it is thrown
  • Loading branch information...
davecramer committed Nov 10, 2015
1 parent 9133012 commit e975c07ceecea4d2aee457e56a6964bc4203fdba
Showing with 3 additions and 8 deletions.
  1. +3 −8 org/postgresql/test/jdbc2/ArrayTest.java
@@ -413,6 +413,7 @@ public void testNonStandardDelimiter() throws SQLException
assertTrue(!arrRS.next());
}
public void testEmptyBinaryArray() throws SQLException
{
@@ -421,19 +422,13 @@ public void testEmptyBinaryArray() throws SQLException
((org.postgresql.PGStatement)pstmt).setPrepareThreshold(-1);
ResultSet rs = pstmt.executeQuery();
while (rs.next()) {
Array array = rs.getArray(1);
if (!rs.wasNull())
{
ResultSet ars = array.getResultSet();
try
{
ars.getMetaData().getColumnType(1); // this throws NPE
}
catch (NullPointerException ex)
{
assertTrue("should not get here",true);
}
assertEquals(java.sql.Types.INTEGER,ars.getMetaData().getColumnType(1));
}
}

0 comments on commit e975c07

Please sign in to comment.