harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ruth Cao (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4210) [classlib][sql] javax.sql.SerialArray(Array) throws NullPointerException when one of the Array member is downcasted to Object
Date Mon, 18 Jun 2007 08:32:26 GMT
[classlib][sql] javax.sql.SerialArray(Array) throws NullPointerException when one of the Array
member is downcasted to Object
-----------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-4210
                 URL: https://issues.apache.org/jira/browse/HARMONY-4210
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: Windows XP / Linux
            Reporter: Ruth Cao


Given the following test case:

public void testConstructor_ObjectArray() throws SQLException {
        assertNotNull(new SerialArray(new SQLArray()));
}

private static class SQLArray implements java.sql.Array {

        Object[] array;

        SQLArray() throws SQLException {

            char[] chars = { 'a', 'b', 'c', 'd' };
            array = new Object[1];

            array[0] = (Object) new SerialClob(chars);
        }

        public Object getArray() {
            return array;
        }

        public int getBaseType() {
            return java.sql.Types.CLOB;
        }

        /** Everything below here is just supplied to satisfy
         the interface and is not part of this testcase.
         **/

        public Object getArray(long index, int count) {
            return null;
        }

        public Object getArray(long index, int count, Map<String, Class<?>> map)
{
            return null;
        }

        public Object getArray(Map<String, Class<?>> map) {
            return null;
        }

        public String getBaseTypeName() {
            return null;
        }

        public ResultSet getResultSet() {
            return null;
        }

        public ResultSet getResultSet(long index, int count) {
            return null;
        }

        public ResultSet getResultSet(Map<String, Class<?>> map) {
            return null;
        }

        public ResultSet getResultSet(long index, int count,
                Map<String, Class<?>> map) {
            return null;
        }
    }

I'll create a patch for this soon, thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message