postgresql-jdbc.git / summary / log / commit / refs
commit 7bfd7a0054144239e047e422313dac767666b341
Author: Dave Cramer <davecramer@gmail.com>
Date: Sun Jun 24 11:10:17 2012 +0000
formatting changes
org/postgresql/jdbc4/AbstractJdbc4Connection.java | 30 +++++++++++------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/org/postgresql/jdbc4/AbstractJdbc4Connection.java b/org/postgresql/jdbc4/AbstractJdbc4Connection.java
index 2d9e1660..444a582d 100644
--- a/org/postgresql/jdbc4/AbstractJdbc4Connection.java
+++ b/org/postgresql/jdbc4/AbstractJdbc4Connection.java
@@ -116,26 +116,26 @@ abstract class AbstractJdbc4Connection extends org.postgresql.jdbc3g.AbstractJdb
public boolean isValid(int timeout) throws SQLException
{
checkClosed();
- if (timeout < 0) {
- throw new PSQLException(GT.tr("Invalid timeout ({0}<0).", timeout), PSQLState.INVALID_PARAMETER_VALUE);
- }
+ if (timeout < 0) {
+ throw new PSQLException(GT.tr("Invalid timeout ({0}<0).", timeout), PSQLState.INVALID_PARAMETER_VALUE);
+ }
boolean valid = false;
- Statement stmt = null;
+ Statement stmt = null;
try {
- if (!isClosed()) {
- stmt = createStatement();
- stmt.setQueryTimeout( timeout );
- stmt.executeQuery( "SELECT 1" );
- valid = true;
- }
+ if (!isClosed()) {
+ stmt = createStatement();
+ stmt.setQueryTimeout( timeout );
+ stmt.executeQuery( "SELECT 1" );
+ valid = true;
+ }
}
catch ( SQLException e) {
getLogger().log(GT.tr("Validating connection."),e);
- }
- finally
- {
- if(stmt!=null) try {stmt.close();}catch(Exception ex){}
- }
+ }
+ finally
+ {
+ if(stmt!=null) try {stmt.close();}catch(Exception ex){}
+ }
return valid;
}
[parent: bddc05f939ac]