Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.3
-
None
Description
Unless I'm reading the code incorrectly, it appears that the fillStatement function does not complain if you provide too few parameters. For example, if you supply an SQL statement like: select * from blah where ? = ?; but only provide a single parameter "test", fillStatement returns without issue. However, only the first ? is actually set.
Granted, this will almost always cause an exception to be thrown by the driver, but since there is already a check for too many parameters, why not check for too few as well?
(FYI: I came across this bug, and a few others in my AsyncQueryRunner implementation, while re-writing the unit tests to use Mockito.)