diff options
author | Brian S. O'Neill <bronee@gmail.com> | 2007-01-30 02:40:11 +0000 |
---|---|---|
committer | Brian S. O'Neill <bronee@gmail.com> | 2007-01-30 02:40:11 +0000 |
commit | 2682e527b3ebbea20d393992069b3aaeded15fe5 (patch) | |
tree | 0099f9dfddb92b303148ad1a8ded37fc7c8197d7 | |
parent | c5f9b449e0bfd34438ba81d47a6e778a9bf90a30 (diff) |
Fix broken build.
-rw-r--r-- | RELEASE-NOTES.txt | 3 | ||||
-rw-r--r-- | src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java | 9 |
2 files changed, 4 insertions, 8 deletions
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt index 6bc0d72..ef99b2d 100644 --- a/RELEASE-NOTES.txt +++ b/RELEASE-NOTES.txt @@ -13,7 +13,8 @@ Carbonado change history - Fixed bug when filtering against negative floating point values.
- Fixed multiple cursor implementations to be extra paranoid and close the
cursor when an exception is thrown.
-- Fixed JDBC cursor implementation to close the connection when an exception is thrown.
+- Fixed JDBC cursor implementation to close the connection when an exception is
+ thrown during cursor construction.
1.1-BETA8 to 1.1-BETA9
-------------------------------
diff --git a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java index 489c288..d6ceb62 100644 --- a/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java +++ b/src/main/java/com/amazon/carbonado/repo/jdbc/JDBCStorage.java @@ -457,12 +457,7 @@ class JDBCStorage<S extends Storable> extends StandardQueryFactory<S> public Cursor<S> fetch(FilterValues<S> values) throws FetchException {
boolean forUpdate = mRepository.openTransactionManager().isForUpdate();
- Connection con;
- try {
- con = mRepository.getConnection();
- } catch (FetchException e) {
- throw e.toPersistException();
- }
+ Connection con = mRepository.getConnection();
try {
PreparedStatement ps = con.prepareStatement(prepareSelect(values, forUpdate));
setParameters(ps, values);
@@ -471,7 +466,7 @@ class JDBCStorage<S extends Storable> extends StandardQueryFactory<S> //in case of exception, yield connection
try {
mRepository.yieldConnection(con);
- } catch (FetchException e) {
+ } catch (FetchException e2) {
//ignore and allow triggering exception to propagate
}
throw mRepository.toFetchException(e);
|