[libpostgresql-jdbc-java] 103/128: finally should call super
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Mon Jan 9 10:18:35 UTC 2017
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to annotated tag REL9_3_1100
in repository libpostgresql-jdbc-java.
commit ccd4e7e2eaa4062bb008067302bfdd681c12f4ec
Author: Dave Cramer <davecramer at gmail.com>
Date: Tue Sep 3 06:47:46 2013 -0400
finally should call super
---
org/postgresql/jdbc2/AbstractJdbc2Connection.java | 15 +++++++++++----
org/postgresql/jdbc2/AbstractJdbc2Statement.java | 6 +++++-
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/org/postgresql/jdbc2/AbstractJdbc2Connection.java b/org/postgresql/jdbc2/AbstractJdbc2Connection.java
index 822ad73..48a5260 100644
--- a/org/postgresql/jdbc2/AbstractJdbc2Connection.java
+++ b/org/postgresql/jdbc2/AbstractJdbc2Connection.java
@@ -1008,10 +1008,17 @@ public abstract class AbstractJdbc2Connection implements BaseConnection
*/
protected void finalize() throws Throwable
{
- if (openStackTrace != null)
- logger.log(GT.tr("Finalizing a Connection that was never closed:"), openStackTrace);
-
- close();
+ try
+ {
+ if (openStackTrace != null)
+ logger.log(GT.tr("Finalizing a Connection that was never closed:"), openStackTrace);
+
+ close();
+ }
+ finally
+ {
+ super.finalize();
+ }
}
/*
diff --git a/org/postgresql/jdbc2/AbstractJdbc2Statement.java b/org/postgresql/jdbc2/AbstractJdbc2Statement.java
index e6432db..3b82829 100644
--- a/org/postgresql/jdbc2/AbstractJdbc2Statement.java
+++ b/org/postgresql/jdbc2/AbstractJdbc2Statement.java
@@ -872,7 +872,7 @@ public abstract class AbstractJdbc2Statement implements BaseStatement
* This finalizer ensures that statements that have allocated server-side
* resources free them when they become unreferenced.
*/
- protected void finalize() {
+ protected void finalize() throws Throwable {
try
{
close();
@@ -880,6 +880,10 @@ public abstract class AbstractJdbc2Statement implements BaseStatement
catch (SQLException e)
{
}
+ finally
+ {
+ super.finalize();
+ }
}
/*
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libpostgresql-jdbc-java.git
More information about the pkg-java-commits
mailing list