bayard 2002/11/09 23:33:36
Modified: dbutils/src/java/org/apache/commons/dbutils DbUtils.java
Log:
Fixed my ingrained habit of doing 'static public'
Revision Changes Path
1.3 +10 -10
jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils/DbUtils.java
Index: DbUtils.java
===================================================================
RCS file:
/home/cvs/jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils/DbUtils.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DbUtils.java 10 Nov 2002 07:32:37 -0000 1.2
+++ DbUtils.java 10 Nov 2002 07:33:36 -0000 1.3
@@ -70,7 +70,7 @@
* Ensures that a database driver class is loaded.
* If this succeeds, then it returns true, else it returns false.
*/
- static public boolean ensureLoaded(String name) {
+ public static boolean ensureLoaded(String name) {
try {
Class.forName(name).newInstance();
return true;
@@ -90,7 +90,7 @@
* Create an Object array from a ResultSet.
* It is assumed that next() has already been called on the ResultSet.
*/
- static public Object[] resultSetToArray(ResultSet rs) throws SQLException {
+ public static Object[] resultSetToArray(ResultSet rs) throws SQLException {
ResultSetMetaData meta = rs.getMetaData();
int sz = meta.getColumnCount();
Object[] objs = new Object[sz];
@@ -110,7 +110,7 @@
* This version uses JDBC-2 code, which Oracle 9i fails
* to support.
*/
- static public Iterator iterateResultSet(ResultSet rs) {
+ public static Iterator iterateResultSet(ResultSet rs) {
return new ResultSetIterator(rs);
}
@@ -119,14 +119,14 @@
* for each row of the result set.
* This version uses JDBC-1 code.
*/
- static public Iterator iterateResultSetVersion1(ResultSet rs) {
+ public static Iterator iterateResultSetVersion1(ResultSet rs) {
return new ResultSetIteratorV1(rs);
}
/**
* Close a connection, avoid closing if null.
*/
- static public void close(Connection conn) throws SQLException {
+ public static void close(Connection conn) throws SQLException {
if(conn == null) {
return;
}
@@ -136,7 +136,7 @@
/**
* Close a statement, avoid closing if null.
*/
- static public void close(Statement stat) throws SQLException {
+ public static void close(Statement stat) throws SQLException {
if(stat == null) {
return;
}
@@ -146,7 +146,7 @@
/**
* Close a result set, avoid closing if null.
*/
- static public void close(ResultSet rs) throws SQLException {
+ public static void close(ResultSet rs) throws SQLException {
if(rs == null) {
return;
}
@@ -157,7 +157,7 @@
* Close a connection, avoid closing if null and hide
* any exceptions that occur.
*/
- static public void closeQuietly(Connection conn) {
+ public static void closeQuietly(Connection conn) {
try {
close(conn);
} catch(SQLException sqle) {
@@ -169,7 +169,7 @@
* Close a statement, avoid closing if null and hide
* any exceptions that occur.
*/
- static public void closeQuietly(Statement stat) {
+ public static void closeQuietly(Statement stat) {
try {
close(stat);
} catch(SQLException sqle) {
@@ -181,7 +181,7 @@
* Close a result set, avoid closing if null and hide
* any exceptions that occur.
*/
- static public void closeQuietly(ResultSet rs) {
+ public static void closeQuietly(ResultSet rs) {
try {
close(rs);
} catch(SQLException sqle) {
--
To unsubscribe, e-mail: <mailto:commons-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@;jakarta.apache.org>