@@ -31,8 +31,8 @@ public class Driver implements java.sql.Driver
31
31
32
32
public static final int DEBUG = 2;
33
33
public static final int INFO = 1;
34
- public static boolean logDebug = false;
35
- public static boolean logInfo = false;
34
+ public static boolean logDebug = false;
35
+ public static boolean logInfo = false;
36
36
37
37
static
38
38
{
@@ -70,11 +70,11 @@ public class Driver implements java.sql.Driver
70
70
* to/from the database to unicode. If multibyte is enabled on the
71
71
* server then the character set of the database is used as the default,
72
72
* otherwise the jvm character encoding is used as the default.
73
- * loglevel - (optional) Enable logging of messages from the driver.
74
- * The value is an integer from 1 to 2 where:
75
- * INFO = 1, DEBUG = 2
76
- * The output is sent to DriverManager.getPrintWriter() if set,
77
- * otherwise it is sent to System.out.
73
+ * loglevel - (optional) Enable logging of messages from the driver.
74
+ * The value is an integer from 1 to 2 where:
75
+ * INFO = 1, DEBUG = 2
76
+ * The output is sent to DriverManager.getPrintWriter() if set,
77
+ * otherwise it is sent to System.out.
78
78
* compatible - (optional) This is used to toggle
79
79
* between different functionality as it changes across different releases
80
80
* of the jdbc driver code. The values here are versions of the jdbc
@@ -109,20 +109,23 @@ public class Driver implements java.sql.Driver
109
109
{
110
110
if ((props = parseURL(url, info)) == null)
111
111
{
112
- if (Driver.logDebug) Driver.debug("Error in url" + url);
112
+ if (Driver.logDebug)
113
+ Driver.debug("Error in url" + url);
113
114
return null;
114
115
}
115
116
try
116
117
{
117
- if (Driver.logDebug) Driver.debug("connect " + url);
118
+ if (Driver.logDebug)
119
+ Driver.debug("connect " + url);
118
120
119
121
@JDBCCONNECTCLASS@ con = (@JDBCCONNECTCLASS@)(Class.forName("@JDBCCONNECTCLASS@").newInstance());
120
122
con.openConnection (host(), port(), props, database(), url, this);
121
123
return (java.sql.Connection)con;
122
124
}
123
125
catch (ClassNotFoundException ex)
124
126
{
125
- if (Driver.logDebug) Driver.debug("error", ex);
127
+ if (Driver.logDebug)
128
+ Driver.debug("error", ex);
126
129
throw new PSQLException("postgresql.jvm.version", ex);
127
130
}
128
131
catch (PSQLException ex1)
@@ -133,7 +136,8 @@ public class Driver implements java.sql.Driver
133
136
}
134
137
catch (Exception ex2)
135
138
{
136
- if (Driver.logDebug) Driver.debug("error", ex2);
139
+ if (Driver.logDebug)
140
+ Driver.debug("error", ex2);
137
141
throw new PSQLException("postgresql.unusual", ex2);
138
142
}
139
143
}
@@ -177,7 +181,7 @@ public class Driver implements java.sql.Driver
177
181
*/
178
182
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
179
183
{
180
- //This method isn't really implemented
184
+ //This method isn't really implemented
181
185
Properties p = parseURL(url, info);
182
186
return new DriverPropertyInfo[0];
183
187
}
@@ -385,16 +389,16 @@ public class Driver implements java.sql.Driver
385
389
}
386
390
387
391
/**
388
- *used to turn logging on to a certain level, can be called
392
+ *used to turn logging on to a certain level, can be called
389
393
*by specifying fully qualified class ie org.postgresql.Driver.setLogLevel()
390
394
*@param int logLevel sets the level which logging will respond to
391
- * INFO being almost no messages
395
+ *INFO being almost no messages
392
396
*DEBUG most verbose
393
397
*/
394
398
public static void setLogLevel(int logLevel)
395
399
{
396
- logDebug = (logLevel >= DEBUG) ? true : false;
397
- logInfo = (logLevel >= INFO) ? true : false;
400
+ logDebug = (logLevel >= DEBUG) ? true : false;
401
+ logInfo = (logLevel >= INFO) ? true : false;
398
402
}
399
403
/*
400
404
* logging message at the debug level
@@ -441,7 +445,7 @@ public class Driver implements java.sql.Driver
441
445
}
442
446
}
443
447
444
- //The build number should be incremented for every new build
445
- private static int m_buildNumber = 104;
448
+ //The build number should be incremented for every new build
449
+ private static int m_buildNumber = 104;
446
450
447
451
}