Author: bayard Date: Tue Nov 28 15:06:17 2006 New Revision: 480268 URL: http://svn.apache.org/viewvc?view=rev&rev=480268 Log: All SQLExceptions without a comment now match the JDK comment of '- if a database access error occurs'
Modified: jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/DbUtils.java jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryRunner.java jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/ResultSetHandler.java jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayHandler.java jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayListHandler.java jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/BeanHandler.java jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/BeanListHandler.java jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ColumnListHandler.java jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/KeyedHandler.java jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapHandler.java jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapListHandler.java jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ScalarHandler.java jakarta/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSet.java jakarta/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/wrappers/StringTrimmedResultSetTest.java Modified: jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/DbUtils.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/DbUtils.java?view=diff&rev=480268&r1=480267&r2=480268 ============================================================================== --- jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/DbUtils.java (original) +++ jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/DbUtils.java Tue Nov 28 15:06:17 2006 @@ -215,7 +215,7 @@ /** * Rollback any changes made on the given connection. * @param conn The database Connection to rollback. A null value is legal. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ public static void rollback(Connection conn) throws SQLException { if (conn != null) { Modified: jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryRunner.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryRunner.java?view=diff&rev=480268&r1=480267&r2=480268 ============================================================================== --- jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryRunner.java (original) +++ jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryRunner.java Tue Nov 28 15:06:17 2006 @@ -67,7 +67,7 @@ * @param params An array of query replacement parameters. Each row in * this array is one set of batch replacement values. * @return The number of rows updated per statement. - * @throws SQLException + * @throws SQLException - if a database access error occurs * @since DbUtils 1.1 */ public int[] batch(Connection conn, String sql, Object[][] params) @@ -103,7 +103,7 @@ * @param params An array of query replacement parameters. Each row in * this array is one set of batch replacement values. * @return The number of rows updated per statement. - * @throws SQLException + * @throws SQLException - if a database access error occurs * @since DbUtils 1.1 */ public int[] batch(String sql, Object[][] params) throws SQLException { @@ -122,7 +122,7 @@ * @param stmt * @param params Query replacement parameters; <code>null</code> is a valid * value to pass in. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ protected void fillStatement(PreparedStatement stmt, Object[] params) throws SQLException { @@ -165,7 +165,7 @@ * <code>PreparedStatement</code> * @param sql The SQL statement to prepare. * @return An initialized <code>PreparedStatement</code>. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ protected PreparedStatement prepareStatement(Connection conn, String sql) throws SQLException { @@ -182,7 +182,7 @@ * implementation simply calls <code>ds.getConnection()</code>. * * @return An initialized <code>Connection</code>. - * @throws SQLException + * @throws SQLException - if a database access error occurs * @since DbUtils 1.1 */ protected Connection prepareConnection() throws SQLException { @@ -202,7 +202,7 @@ * @param param The replacement parameter. * @param rsh The handler that converts the results into an object. * @return The object returned by the handler. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ public Object query(Connection conn, String sql, Object param, ResultSetHandler rsh) throws SQLException { @@ -219,7 +219,7 @@ * @param params The replacement parameters. * @param rsh The handler that converts the results into an object. * @return The object returned by the handler. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ public Object query(Connection conn, String sql, Object[] params, ResultSetHandler rsh) throws SQLException { @@ -256,7 +256,7 @@ * @param sql The query to execute. * @param rsh The handler that converts the results into an object. * @return The object returned by the handler. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ public Object query(Connection conn, String sql, ResultSetHandler rsh) throws SQLException { @@ -275,7 +275,7 @@ * the <code>ResultSet</code>. * * @return An object generated by the handler. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ public Object query(String sql, Object param, ResultSetHandler rsh) throws SQLException { @@ -296,7 +296,7 @@ * the <code>ResultSet</code>. * * @return An object generated by the handler. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ public Object query(String sql, Object[] params, ResultSetHandler rsh) throws SQLException { @@ -320,7 +320,7 @@ * the <code>ResultSet</code>. * * @return An object generated by the handler. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ public Object query(String sql, ResultSetHandler rsh) throws SQLException { return this.query(sql, (Object[]) null, rsh); @@ -337,7 +337,7 @@ * @param params The query replacement parameters; <code>null</code> is a * valid value to pass in. * - * @throws SQLException + * @throws SQLException - if a database access error occurs */ protected void rethrow(SQLException cause, String sql, Object[] params) throws SQLException { @@ -380,7 +380,7 @@ * @param conn The connection to use to run the query. * @param sql The SQL to execute. * @return The number of rows updated. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ public int update(Connection conn, String sql) throws SQLException { return this.update(conn, sql, (Object[]) null); @@ -394,7 +394,7 @@ * @param sql The SQL to execute. * @param param The replacement parameter. * @return The number of rows updated. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ public int update(Connection conn, String sql, Object param) throws SQLException { @@ -409,7 +409,7 @@ * @param sql The SQL to execute. * @param params The query replacement parameters. * @return The number of rows updated. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ public int update(Connection conn, String sql, Object[] params) throws SQLException { @@ -440,7 +440,7 @@ * not be saved. * * @param sql The SQL statement to execute. - * @throws SQLException + * @throws SQLException - if a database access error occurs * @return The number of rows updated. */ public int update(String sql) throws SQLException { @@ -456,7 +456,7 @@ * * @param sql The SQL statement to execute. * @param param The replacement parameter. - * @throws SQLException + * @throws SQLException - if a database access error occurs * @return The number of rows updated. */ public int update(String sql, Object param) throws SQLException { @@ -472,7 +472,7 @@ * @param sql The SQL statement to execute. * @param params Initializes the PreparedStatement's IN (i.e. '?') * parameters. - * @throws SQLException + * @throws SQLException - if a database access error occurs * @return The number of rows updated. */ public int update(String sql, Object[] params) throws SQLException { @@ -514,7 +514,7 @@ * Close a <code>Connection</code>. This implementation avoids closing if * null and does <strong>not</strong> suppress any exceptions. Subclasses * can override to provide special handling like logging. - * @throws SQLException + * @throws SQLException - if a database access error occurs * @since DbUtils 1.1 */ protected void close(Connection conn) throws SQLException { @@ -525,7 +525,7 @@ * Close a <code>Statement</code>. This implementation avoids closing if * null and does <strong>not</strong> suppress any exceptions. Subclasses * can override to provide special handling like logging. - * @throws SQLException + * @throws SQLException - if a database access error occurs * @since DbUtils 1.1 */ protected void close(Statement stmt) throws SQLException { @@ -536,7 +536,7 @@ * Close a <code>ResultSet</code>. This implementation avoids closing if * null and does <strong>not</strong> suppress any exceptions. Subclasses * can override to provide special handling like logging. - * @throws SQLException + * @throws SQLException - if a database access error occurs * @since DbUtils 1.1 */ protected void close(ResultSet rs) throws SQLException { Modified: jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/ResultSetHandler.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/ResultSetHandler.java?view=diff&rev=480268&r1=480267&r2=480268 ============================================================================== --- jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/ResultSetHandler.java (original) +++ jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/ResultSetHandler.java Tue Nov 28 15:06:17 2006 @@ -34,7 +34,7 @@ * legal for implementations to return <code>null</code> if the * <code>ResultSet</code> contained 0 rows. * - * @throws SQLException + * @throws SQLException - if a database access error occurs */ public Object handle(ResultSet rs) throws SQLException; Modified: jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayHandler.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayHandler.java?view=diff&rev=480268&r1=480267&r2=480268 ============================================================================== --- jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayHandler.java (original) +++ jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayHandler.java Tue Nov 28 15:06:17 2006 @@ -70,7 +70,7 @@ * @return An Object[] or <code>null</code> if there are no rows in the * <code>ResultSet</code>. * - * @throws SQLException + * @throws SQLException - if a database access error occurs * @see org.apache.commons.dbutils.ResultSetHandler#handle(java.sql.ResultSet) */ public Object handle(ResultSet rs) throws SQLException { Modified: jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayListHandler.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayListHandler.java?view=diff&rev=480268&r1=480267&r2=480268 ============================================================================== --- jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayListHandler.java (original) +++ jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayListHandler.java Tue Nov 28 15:06:17 2006 @@ -61,7 +61,7 @@ * * @return <code>Object[]</code>, never <code>null</code>. * - * @throws SQLException + * @throws SQLException - if a database access error occurs * @see org.apache.commons.dbutils.handlers.GenericListHandler#handle(ResultSet) */ protected Object handleRow(ResultSet rs) throws SQLException { Modified: jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/BeanHandler.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/BeanHandler.java?view=diff&rev=480268&r1=480267&r2=480268 ============================================================================== --- jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/BeanHandler.java (original) +++ jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/BeanHandler.java Tue Nov 28 15:06:17 2006 @@ -71,7 +71,7 @@ * @return An initialized JavaBean or <code>null</code> if there were no * rows in the <code>ResultSet</code>. * - * @throws SQLException + * @throws SQLException - if a database access error occurs * @see org.apache.commons.dbutils.ResultSetHandler#handle(java.sql.ResultSet) */ public Object handle(ResultSet rs) throws SQLException { Modified: jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/BeanListHandler.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/BeanListHandler.java?view=diff&rev=480268&r1=480267&r2=480268 ============================================================================== --- jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/BeanListHandler.java (original) +++ jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/BeanListHandler.java Tue Nov 28 15:06:17 2006 @@ -70,7 +70,7 @@ * * @return A bean, never <code>null</code>. * - * @throws SQLException + * @throws SQLException - if a database access error occurs * @see org.apache.commons.dbutils.handlers.GenericListHandler#handle(ResultSet) */ protected Object handleRow(ResultSet rs) throws SQLException { Modified: jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ColumnListHandler.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ColumnListHandler.java?view=diff&rev=480268&r1=480267&r2=480268 ============================================================================== --- jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ColumnListHandler.java (original) +++ jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ColumnListHandler.java Tue Nov 28 15:06:17 2006 @@ -73,7 +73,7 @@ * * @return <code>Object</code>, never <code>null</code>. * - * @throws SQLException + * @throws SQLException - if a database access error occurs * * @see org.apache.commons.dbutils.handlers.GenericListHandler#handle(ResultSet) */ Modified: jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/KeyedHandler.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/KeyedHandler.java?view=diff&rev=480268&r1=480267&r2=480268 ============================================================================== --- jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/KeyedHandler.java (original) +++ jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/KeyedHandler.java Tue Nov 28 15:06:17 2006 @@ -123,7 +123,7 @@ * in a <code>Map</code> under <code>ResultSet.getObject(key)</code> key. * * @return A <code>Map</code> of Maps, never <code>null</code>. - * @throws SQLException + * @throws SQLException - if a database access error occurs * @see org.apache.commons.dbutils.ResultSetHandler#handle(java.sql.ResultSet) */ public Object handle(ResultSet rs) throws SQLException { @@ -148,7 +148,7 @@ * key value from the current <code>ResultSet</code> row. This * implementation returns <code>ResultSet.getObject()</code> for the * configured key column name or index. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ protected Object createKey(ResultSet rs) throws SQLException { return (columnName == null) ? rs.getObject(columnIndex) : rs @@ -161,7 +161,7 @@ * implementation returns a <code>Map</code> with case insensitive column * names as keys. Calls to <code>map.get("COL")</code> and * <code>map.get("col")</code> return the same value. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ protected Object createRow(ResultSet rs) throws SQLException { return this.convert.toMap(rs); Modified: jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapHandler.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapHandler.java?view=diff&rev=480268&r1=480267&r2=480268 ============================================================================== --- jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapHandler.java (original) +++ jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapHandler.java Tue Nov 28 15:06:17 2006 @@ -63,7 +63,7 @@ * @return A <code>Map</code> with the values from the first row or * <code>null</code> if there are no rows in the <code>ResultSet</code>. * - * @throws SQLException + * @throws SQLException - if a database access error occurs * * @see org.apache.commons.dbutils.ResultSetHandler#handle(java.sql.ResultSet) */ Modified: jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapListHandler.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapListHandler.java?view=diff&rev=480268&r1=480267&r2=480268 ============================================================================== --- jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapListHandler.java (original) +++ jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapListHandler.java Tue Nov 28 15:06:17 2006 @@ -60,7 +60,7 @@ * * @return A <code>Map</code>, never null. * - * @throws SQLException + * @throws SQLException - if a database access error occurs * * @see org.apache.commons.dbutils.handlers.GenericListHandler#handle(ResultSet) */ Modified: jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ScalarHandler.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ScalarHandler.java?view=diff&rev=480268&r1=480267&r2=480268 ============================================================================== --- jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ScalarHandler.java (original) +++ jakarta/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ScalarHandler.java Tue Nov 28 15:06:17 2006 @@ -76,7 +76,7 @@ * @return The column or <code>null</code> if there are no rows in * the <code>ResultSet</code>. * - * @throws SQLException + * @throws SQLException - if a database access error occurs * * @see org.apache.commons.dbutils.ResultSetHandler#handle(java.sql.ResultSet) */ Modified: jakarta/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSet.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSet.java?view=diff&rev=480268&r1=480267&r2=480268 ============================================================================== --- jakarta/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSet.java (original) +++ jakarta/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/MockResultSet.java Tue Nov 28 15:06:17 2006 @@ -72,7 +72,7 @@ * index that the client is trying to get at. * @param args * @return A column index. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ private int columnIndex(Object[] args) throws SQLException { @@ -106,7 +106,7 @@ /** * Gets the boolean value at the given column index. * @param columnIndex A 1 based index. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ protected Object getBoolean(int columnIndex) throws SQLException { Object obj = this.currentRow[columnIndex - 1]; @@ -125,7 +125,7 @@ /** * Gets the byte value at the given column index. * @param columnIndex A 1 based index. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ protected Object getByte(int columnIndex) throws SQLException { Object obj = this.currentRow[columnIndex - 1]; @@ -144,7 +144,7 @@ /** * Gets the double value at the given column index. * @param columnIndex A 1 based index. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ protected Object getDouble(int columnIndex) throws SQLException { Object obj = this.currentRow[columnIndex - 1]; @@ -163,7 +163,7 @@ /** * Gets the float value at the given column index. * @param columnIndex A 1 based index. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ protected Object getFloat(int columnIndex) throws SQLException { Object obj = this.currentRow[columnIndex - 1]; @@ -180,7 +180,7 @@ /** * Gets the int value at the given column index. * @param columnIndex A 1 based index. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ protected Object getInt(int columnIndex) throws SQLException { Object obj = this.currentRow[columnIndex - 1]; @@ -199,7 +199,7 @@ /** * Gets the long value at the given column index. * @param columnIndex A 1 based index. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ protected Object getLong(int columnIndex) throws SQLException { Object obj = this.currentRow[columnIndex - 1]; @@ -220,7 +220,7 @@ /** * Gets the object at the given column index. * @param columnIndex A 1 based index. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ protected Object getObject(int columnIndex) throws SQLException { Object obj = this.currentRow[columnIndex - 1]; @@ -231,7 +231,7 @@ /** * Gets the short value at the given column index. * @param columnIndex A 1 based index. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ protected Object getShort(int columnIndex) throws SQLException { Object obj = this.currentRow[columnIndex - 1]; @@ -250,7 +250,7 @@ /** * Gets the String at the given column index. * @param columnIndex A 1 based index. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ protected String getString(int columnIndex) throws SQLException { Object obj = this.getObject(columnIndex); Modified: jakarta/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/wrappers/StringTrimmedResultSetTest.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/wrappers/StringTrimmedResultSetTest.java?view=diff&rev=480268&r1=480267&r2=480268 ============================================================================== --- jakarta/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/wrappers/StringTrimmedResultSetTest.java (original) +++ jakarta/commons/proper/dbutils/trunk/src/test/org/apache/commons/dbutils/wrappers/StringTrimmedResultSetTest.java Tue Nov 28 15:06:17 2006 @@ -49,7 +49,7 @@ /** * Make sure 2 wrappers work together. - * @throws SQLException + * @throws SQLException - if a database access error occurs */ public void testMultipleWrappers() throws Exception { // Create a ResultSet with data --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]