GitHub user dsbos opened a pull request:
https://github.com/apache/drill/pull/170
DRILL-2489: Throw exception from remaining methods for closed JDBC objects.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dsbos/incubator-drill
bugs/drill-2769_2489_JDBC_exceptions
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/drill/pull/170.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #170
----
commit 90bf53dee9407d40065a820a6f0b7a35cf54fbea
Author: dbarclay <[email protected]>
Date: 2015-08-19T23:55:40Z
DRILL-2489: Throw exception from remaining methods for closed JDBC objects.
Refactored unit test to check all methods per interface. (Replaced
individual,
static test methods with bulk reflection-based checking.)
[Drill2489CallsAfterCloseThrowExceptionsTest]
Added DrillResultSetMetaDataImpl.
Added method overrides to check state for remaining methods from Connection,
Statement, PreparedStatement, ResultSet, ResultSetMetaData and
DatabaseMetaData.
Also:
- renamed checkNotClosed to throwIfClosed.
commit fb960d8be27c3a810474caedfe4a0890fd0222ac
Author: dbarclay <[email protected]>
Date: 2015-08-27T21:05:26Z
DRILL-2769: Fix most non-SQLException not-supported-yet exceptions.
Core:
Added (auto-scanning) unit test.
[Drill2769UnsupportedReportsUseSqlExceptionTest]
Added translation of lots of UnsupportedOperationExceptions (and some
RuntimeExceptions) from Avatica code to SQLFeatureNotSupportedExceptions
(tons
of method overrides).
Also:
Added explicit bounds checks in ResultSetMetaData methods and checking of
last-accessed column in DrillAccessorList.wasNull() (to fix other
RuntimeExceptions to SQLExceptions).
Added resetting of last-accessed column to fix latent bug in
DrillAccessorList.
Hygiene:
- Renamed some zero-based index/ordinal-position parameters to "...Offset".
- Renamed some one-based index/ordinal-position parameters to "...Number".
- Renamed DrillAccessorList lastColumn to rowLastColumnOffset; declared
explicit logical null value for rowLastColumnOffset.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---