You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Ruth Cao (JIRA)" <ji...@apache.org> on 2007/06/19 07:28:26 UTC

[jira] Closed: (HARMONY-4210) [classlib][sql] javax.sql.SerialArray(Array) throws NullPointerException when one of the Array member is downcasted to Object

     [ https://issues.apache.org/jira/browse/HARMONY-4210?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ruth Cao closed HARMONY-4210.
-----------------------------


Thanks, Tony. The fix looks fine.

> [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
>            Assignee: Tony Wu
>         Attachments: Harmony-4210.diff
>
>
> 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.