Name: sdR10048 Date: 10/22/2003
Filed By : SPB JCK team (###@###.###)
JDK : java full version "1.5.0-beta-b23"
Problem description
===================
There some methods in BaseRowSet class (they look like setXXX()) with
unclear/ambiguous expected behaviour.
They are:
public void setConcurrency(int concurrency)
public void setFetchDirection(int direction) throws java.sql.SQLException
public void setTransactionIsolation(int level)
Unclear behaviour in case of invalid input integer param.
public void setFetchSize(int rows) throws java.sql.SQLException
"Parameters: rows - the number of rows to fetch; 0 to let the
driver decide what the best fetch size is; must not be less than
0 or more than the maximum number of rows allowed for this JDBC
RowSet (the number returned by a call to the method
getMaxRows())"
The behaviour is unclear in both cases:
1) if 'rows' <= 0
2) if 'rows' > getMaxRows()
public void setMaxFieldSize(int max) throws java.sql.SQLException
Ambiguity:
"Parameters: max - an int indicating the new maximum column size
limit; zero means that there is no limit "
"Throws: java.sql.SQLException - ... or if a size of 0 or less is set."
public void setMaxRows(int max) throws java.sql.SQLException
Ambiguity:
"Parameters: max - .. ;zero means that there is no limit"
"Throws: java.sql.SQLException - ... or if a size of 9 or less is
set."
public void setMaxRows(int max) throws java.sql.SQLException
It is unspecified what will happen with fetchSize property if we
set the maxRows < current fetchSize;
public void setQueryTimeout(int seconds) throws java.sql.SQLException
Ambiguity:
"Parameters: seconds - ... zero means that there is no limit"
"Throws: java.sql.SQLException - ... or if the query time-out
value is of value 0 or less"
public void setType(int type)
Unclear behaviour in case of invalid input integer param.
public void setObject(int parameterIndex, java.lang.Object x, int targetSqlType, int scale) throws java.sql.SQLException
public void setObject(int parameterIndex, java.lang.Object x, int targetSqlType) throws java.sql.SQLException
Unclear behaviour in case of invalid targetSqlType.
public void setNull(int parameterIndex, int sqlType, java.lang.String typeName) throws java.sql.SQLException
public void setNull(int parameterIndex, int sqlType) throws java.sql.SQLException
Unclear behaviour in case of invalid sqlType.
======================================================================
Name: sdR10048 Date: 12/04/2003
setMaxRows(int) fixed partially.
The issue unfixed:
---cut here---
public void setMaxRows(int max) throws java.sql.SQLException
It is unspecified what will happen with fetchSize property if we
set the maxRows < current fetchSize;
---cut here---
Also:
I do not agree that
setObject(int, Object, int targetSqlType, int)
setObject(int, Object, int targetSqlType)
setNull(int, int sqlType, String)
setNull(int, int sqlType)
resolved right.
The @param tag (as you refer) does not specify the expected
behaviour in case of invalid 'targetSqlType' / 'sqlType'.
The javax.sql.RowSet is interface the cases with setConcurrency or
setFetchSize takes less incompatibility than setObject/setNull
cases.
======================================================================