This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to annotated tag REL9_3_1102
in repository libpostgresql-jdbc-java.

commit eb8d050a549176336530a5a5c4c2aeb097e14529
Author: Heikki Linnakangas <[email protected]>
Date:   Wed Nov 13 21:20:48 2013 +0200

    Don't ignore the result of Statement.executeQuery().
    
    Coverity thinks it's bad form.
---
 org/postgresql/jdbc4/AbstractJdbc4Connection.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/org/postgresql/jdbc4/AbstractJdbc4Connection.java 
b/org/postgresql/jdbc4/AbstractJdbc4Connection.java
index 817e457..3d7b0a5 100644
--- a/org/postgresql/jdbc4/AbstractJdbc4Connection.java
+++ b/org/postgresql/jdbc4/AbstractJdbc4Connection.java
@@ -121,12 +121,14 @@ abstract class AbstractJdbc4Connection extends 
org.postgresql.jdbc3g.AbstractJdb
             throw new PSQLException(GT.tr("Invalid timeout ({0}<0).", 
timeout), PSQLState.INVALID_PARAMETER_VALUE);
         }
        boolean valid = false;
-           Statement stmt = null;
+        Statement stmt = null;
+               ResultSet rs;
        try {
                if (!isClosed()) {
                stmt = createStatement();
                stmt.setQueryTimeout( timeout );
-               stmt.executeQuery( "SELECT 1" );
+               rs = stmt.executeQuery( "SELECT 1" );
+                               rs.close();
                valid = true;
            }
        }

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-java/libpostgresql-jdbc-java.git

_______________________________________________
pkg-java-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

Reply via email to