Code review request to remove javadoc build warnings from javax.sql.rowset.BaseRowSet.java
Andrew John Hughes
gnu_andrew at member.fsf.org
Fri Aug 28 01:53:28 UTC 2009
2009/8/28 Joseph D. Darcy <Joe.Darcy at sun.com>:
> Hello.
>
> More cleanup of docs build warnings; this time from
> javax.sql.rowset.BaseRowSet.java where non-existent getter methods are
> repeatedly referenced. Assuming someone approves the change, I'll file a
> bug and commit the fix.
>
> -Joe
>
> --- old/src/share/classes/javax/sql/rowset/BaseRowSet.java 2009-08-27
> 18:04:08.000000000 -0700
> +++ new/src/share/classes/javax/sql/rowset/BaseRowSet.java 2009-08-27
> 18:04:08.000000000 -0700
> @@ -168,8 +168,8 @@
> * The majority of methods for setting placeholder parameters take two
> parameters,
> * with the first parameter
> * indicating which placeholder parameter is to be set, and the second
> parameter
> - * giving the value to be set. Methods such as <code>getInt</code>,
> - * <code>getString</code>, <code>getBoolean</code>, and
> <code>getLong</code> fall into
> + * giving the value to be set. Methods such as <code>setInt</code>,
> + * <code>setString</code>, <code>setBoolean</code>, and
> <code>setLong</code> fall into
> * this category. After these methods have been called, a call to the
> method
> * <code>getParams</code> will return an array with the values that have
> been set. Each
> * element in the array is an <code>Object</code> instance representing the
> @@ -3259,7 +3259,6 @@
> * @param x the parameter value
> * @exception SQLException if a database access error occurs or
> * this method is called on a closed <code>CallableStatement</code>
> - * @see #getBoolean
> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
> support
> * this method
> * @since 1.4
> @@ -3281,7 +3280,6 @@
> * this method is called on a closed <code>CallableStatement</code>
> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
> support
> * this method
> - * @see #getByte
> * @since 1.4
> */
> public void setByte(String parameterName, byte x) throws SQLException{
> @@ -3301,7 +3299,6 @@
> * this method is called on a closed <code>CallableStatement</code>
> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
> support
> * this method
> - * @see #getShort
> * @since 1.4
> */
> public void setShort(String parameterName, short x) throws SQLException{
> @@ -3320,7 +3317,6 @@
> * this method is called on a closed <code>CallableStatement</code>
> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
> support
> * this method
> - * @see #getInt
> * @since 1.4
> */
> public void setInt(String parameterName, int x) throws SQLException{
> @@ -3339,7 +3335,6 @@
> * this method is called on a closed <code>CallableStatement</code>
> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
> support
> * this method
> - * @see #getLong
> * @since 1.4
> */
> public void setLong(String parameterName, long x) throws SQLException{
> @@ -3358,7 +3353,6 @@
> * this method is called on a closed <code>CallableStatement</code>
> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
> support
> * this method
> - * @see #getFloat
> * @since 1.4
> */
> public void setFloat(String parameterName, float x) throws SQLException{
> @@ -3377,7 +3371,6 @@
> * this method is called on a closed <code>CallableStatement</code>
> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
> support
> * this method
> - * @see #getDouble
> * @since 1.4
> */
> public void setDouble(String parameterName, double x) throws SQLException{
> @@ -3398,7 +3391,6 @@
> * this method is called on a closed <code>CallableStatement</code>
> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
> support
> * this method
> - * @see #getBigDecimal
> * @since 1.4
> */
> public void setBigDecimal(String parameterName, BigDecimal x) throws
> SQLException{
> @@ -3421,7 +3413,6 @@
> * this method is called on a closed <code>CallableStatement</code>
> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
> support
> * this method
> - * @see #getString
> * @since 1.4
> */
> public void setString(String parameterName, String x) throws SQLException{
> @@ -3443,7 +3434,6 @@
> * this method is called on a closed <code>CallableStatement</code>
> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
> support
> * this method
> - * @see #getBytes
> * @since 1.4
> */
> public void setBytes(String parameterName, byte x[]) throws SQLException{
> @@ -3464,7 +3454,6 @@
> * this method is called on a closed <code>CallableStatement</code>
> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
> support
> * this method
> - * @see #getTimestamp
> * @since 1.4
> */
> public void setTimestamp(String parameterName, java.sql.Timestamp x)
> @@ -3712,7 +3701,6 @@
> * or <code>STRUCT</code> data type and the JDBC driver does not support
> * this data type
> * @see Types
> - * @see #getObject
> * @since 1.4
> */
> public void setObject(String parameterName, Object x, int targetSqlType,
> int scale)
> @@ -3740,7 +3728,6 @@
> * <code>REF</code>, <code>ROWID</code>, <code>SQLXML</code>
> * or <code>STRUCT</code> data type and the JDBC driver does not support
> * this data type
> - * @see #getObject
> * @since 1.4
> */
> public void setObject(String parameterName, Object x, int targetSqlType)
> @@ -3782,7 +3769,6 @@
> * <code>Object</code> parameter is ambiguous
> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
> support
> * this method
> - * @see #getObject
> * @since 1.4
> */
> public void setObject(String parameterName, Object x) throws SQLException{
> @@ -4064,7 +4050,6 @@
> * this method is called on a closed <code>CallableStatement</code>
> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
> support
> * this method
> - * @see #getDate
> * @since 1.4
> */
> public void setDate(String parameterName, java.sql.Date x)
> @@ -4091,7 +4076,6 @@
> * this method is called on a closed <code>CallableStatement</code>
> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
> support
> * this method
> - * @see #getDate
> * @since 1.4
> */
> public void setDate(String parameterName, java.sql.Date x, Calendar cal)
> @@ -4111,7 +4095,6 @@
> * this method is called on a closed <code>CallableStatement</code>
> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
> support
> * this method
> - * @see #getTime
> * @since 1.4
> */
> public void setTime(String parameterName, java.sql.Time x)
> @@ -4138,7 +4121,6 @@
> * this method is called on a closed <code>CallableStatement</code>
> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
> support
> * this method
> - * @see #getTime
> * @since 1.4
> */
> public void setTime(String parameterName, java.sql.Time x, Calendar cal)
> @@ -4165,7 +4147,6 @@
> * this method is called on a closed <code>CallableStatement</code>
> * @exception SQLFeatureNotSupportedException if the JDBC driver does not
> support
> * this method
> - * @see #getTimestamp
> * @since 1.4
> */
> public void setTimestamp(String parameterName, java.sql.Timestamp x,
> Calendar cal)
>
>
Thanks for this. The initial paragraph is particularly confusing at
present, referring to non-existent methods call getX in the context of
discussing setter methods.
I think the #getX references should actually point to #getParams
rather than being removed. From the documentation:
'A call to the method getParams returns the values stored in the
Hashtable object as an array of Object instances. An element in this
array may be a simple Object instance or an array (which is a type of
Object). The particular setter method used determines whether an
element in this array is an Object or an array.'
So the code that would perform the equivalent of a getDate method
would be getParams()[n], where n is the integer passed to the setDate
method.
Thanks again,
--
Andrew :-)
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
More information about the core-libs-dev
mailing list