commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgra...@apache.org
Subject cvs commit: jakarta-commons-sandbox/dbutils/src/test/org/apache/commons/dbutils/driver SqlNullCheckedResultSetTest.java
Date Tue, 28 Oct 2003 02:59:54 GMT
dgraham     2003/10/27 18:59:54

  Modified:    dbutils/src/java/org/apache/commons/dbutils/driver
                        SqlNullCheckedResultSet.java
               dbutils/src/test/org/apache/commons/dbutils/driver
                        SqlNullCheckedResultSetTest.java
  Log:
  Remove references to deprecated
  ResultSet.getUnicodeStream().
  
  Revision  Changes    Path
  1.6       +4 -25     jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils/driver/SqlNullCheckedResultSet.java
  
  Index: SqlNullCheckedResultSet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils/driver/SqlNullCheckedResultSet.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SqlNullCheckedResultSet.java	22 Oct 2003 02:10:23 -0000	1.5
  +++ SqlNullCheckedResultSet.java	28 Oct 2003 02:59:53 -0000	1.6
  @@ -172,7 +172,6 @@
       private String nullString = null;
       private Time nullTime = null;
       private Timestamp nullTimestamp = null;
  -    private InputStream nullUnicodeStream = null;
   
       /**
        * The wrapped result. 
  @@ -390,16 +389,6 @@
       }
   
       /**
  -     * Returns the value when a SQL null is encountered as the result of
  -     * invoking a <code>getUnicodeStream</code> method.
  -     *
  -     * @return the value
  -     */
  -    public InputStream getNullUnicodeStream() {
  -        return this.nullUnicodeStream;
  -    }
  -
  -    /**
        * Intercepts calls to <code>get*</code> methods and calls the appropriate
        * <code>getNull*</code> method if the <code>ResultSet</code>
returned
        * <code>null</code>.
  @@ -617,16 +606,6 @@
        */
       public void setNullTimestamp(Timestamp nullTimestamp) {
           this.nullTimestamp = nullTimestamp;
  -    }
  -
  -    /**
  -     * Sets the value to return when a SQL null is encountered as the result of
  -     * invoking a <code>getUnicodeStream</code> method.
  -     *
  -     * @param nullUnicodeStream the value
  -     */
  -    public void setNullUnicodeStream(InputStream nullUnicodeStream) {
  -        this.nullUnicodeStream = nullUnicodeStream;
       }
   
   }
  
  
  
  1.2       +4 -40     jakarta-commons-sandbox/dbutils/src/test/org/apache/commons/dbutils/driver/SqlNullCheckedResultSetTest.java
  
  Index: SqlNullCheckedResultSetTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/dbutils/src/test/org/apache/commons/dbutils/driver/SqlNullCheckedResultSetTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SqlNullCheckedResultSetTest.java	24 Oct 2003 03:43:08 -0000	1.1
  +++ SqlNullCheckedResultSetTest.java	28 Oct 2003 02:59:53 -0000	1.2
  @@ -520,25 +520,6 @@
       }
   
       /**
  -     * Tests the getUnicodeStream implementation.
  -     */
  -    public void testGetUnicodeStream() throws SQLException {
  -
  -        assertNull(rs.getUnicodeStream(1));
  -        assertTrue(rs.wasNull());
  -        assertNull(rs.getUnicodeStream("column"));
  -        assertTrue(rs.wasNull());
  -        // Set what gets returned to something other than the default
  -        InputStream stream = new ByteArrayInputStream(new byte[0]);
  -        rs2.setNullUnicodeStream(stream);
  -        assertNotNull(rs.getUnicodeStream(1));
  -        assertEquals(stream, rs.getUnicodeStream(1));
  -        assertNotNull(rs.getUnicodeStream("column"));
  -        assertEquals(stream, rs.getUnicodeStream("column"));
  -
  -    }
  -
  -    /**
        * Tests the setNullAsciiStream implementation.
        */
       public void testSetNullAsciiStream() throws SQLException {
  @@ -863,23 +844,6 @@
           assertEquals(ts, rs.getTimestamp("column", Calendar.getInstance()));
   
       }
  -
  -    /**
  -     * Tests the setNullUnicodeStream implementation.
  -     */
  -    public void testSetNullUnicodeStream() throws SQLException {
  -
  -        assertEquals(null, rs2.getNullUnicodeStream());
  -        // Set what gets returned to something other than the default
  -        InputStream stream = new ByteArrayInputStream(new byte[0]);
  -        rs2.setNullUnicodeStream(stream);
  -        assertNotNull(rs.getUnicodeStream(1));
  -        assertEquals(stream, rs.getUnicodeStream(1));
  -        assertNotNull(rs.getUnicodeStream("column"));
  -        assertEquals(stream, rs.getUnicodeStream("column"));
  -
  -    }
  -
   }
   
   class SqlNullUncheckedMockResultSet implements InvocationHandler {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message