ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandre Boudnik (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (IGNITE-3389) metadata result set throws NPE when closed
Date Tue, 28 Jun 2016 18:26:57 GMT

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

Alexandre Boudnik updated IGNITE-3389:
--------------------------------------
    Description: 
Need to handle when ResultSet has no cursor. It happened only with client JDBC. This code
throws NPE:

{code}
    public void testMetadataResultSetClose() throws Exception {
        try (Connection conn = DriverManager.getConnection(BASE_URL)) {
            try (ResultSet tables = conn.getMetaData().getTables(null, null, "%", null)) {
                int columnCount = tables.getMetaData().getColumnCount();
                while (tables.next())
                    for (int i = 0; i < columnCount; i++)
                        tables.getObject(i + 1);
            }
        }
    }
{code}

  was:Need to handle when ResultSet has no cursor


> metadata result set throws NPE when closed
> ------------------------------------------
>
>                 Key: IGNITE-3389
>                 URL: https://issues.apache.org/jira/browse/IGNITE-3389
>             Project: Ignite
>          Issue Type: Bug
>          Components: clients, odbc, SQL
>    Affects Versions: 1.6, 1.7
>            Reporter: Alexandre Boudnik
>            Assignee: Alexandre Boudnik
>              Labels: easyfix
>             Fix For: 1.7
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> Need to handle when ResultSet has no cursor. It happened only with client JDBC. This
code throws NPE:
> {code}
>     public void testMetadataResultSetClose() throws Exception {
>         try (Connection conn = DriverManager.getConnection(BASE_URL)) {
>             try (ResultSet tables = conn.getMetaData().getTables(null, null, "%", null))
{
>                 int columnCount = tables.getMetaData().getColumnCount();
>                 while (tables.next())
>                     for (int i = 0; i < columnCount; i++)
>                         tables.getObject(i + 1);
>             }
>         }
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message