Genericize database methods; require result instead of masking lack thereof
sbabcoc
released this
24 Jan 08:53
·
46 commits
to master
since this release
This release is focused on a few pervasive issues in the DatabaseUtils class:
- Prior to this release, many methods returned
Object
instead of specifying a generic return type. This required client code to declare explicit type-cast operations and ignore the resulting "unchecked cast" warnings. These have all been updated to eliminate the need for these type-casts. - If the specified query or stored procedure failed to return a result, the two
getString(...)
methods would returnnull
and the twogetInt(...)
methods would return-1
. In this release, failure to return a result for these methods will now cause IllegalStateException to be thrown.
I also added README references to a few neglected utility classes that I hope folks will find useful.