commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <>
Subject [jira] [Commented] (DBUTILS-117) Error in control the use of ParameterMetaData
Date Fri, 12 Dec 2014 11:40:13 GMT


Sebb commented on DBUTILS-117:

However, nor does the Javadoc state that null is not allowed.

It only says it throws:

bq.     SQLException - if a database access error occurs or this method is called on a closed

So what should the library do if it does not support the method?
It would be ambiguous to return a ParameterMetaData with a count of 0, because then one cannot
distinguish it from a statement which has no parameters.

Note that there is example code [1] which explicitly checks for null. I'm sure there are others.

Whether null is explicitly allowed or not, clearly it is considered a possibility, so I agree
the code should check for it.


> Error in control the use of ParameterMetaData
> ---------------------------------------------
>                 Key: DBUTILS-117
>                 URL:
>             Project: Commons DbUtils
>          Issue Type: Bug
>    Affects Versions: 1.5
>            Reporter: Vadim Smirnov
>            Priority: Minor
>              Labels: easyfix, newbie
>             Fix For: 1.7
>         Attachments: DBUTILS-117-tests.patch, DBUTILS-117.patch
>   Original Estimate: 1h
>  Remaining Estimate: 1h
> Error in fillStatement method of AbstractQueryRunner class.
> There is no try...catch statement near pmd = stmt.getParameterMetaData();
> So method fails instead of automaticallye turning pmdKnownBroken to true.

This message was sent by Atlassian JIRA

View raw message