Skip to content

Javadoc for BeanPropertyRowMapper.getColumnValue(ResultSet, int, Class) is inconsistent with code #29285

@trydofor

Description

@trydofor

Affects: BeanPropertyRowMapper spring-jdbc v5.3.22


the Doc says: The default implementation delegates to #getColumnValue(ResultSet, int, Class)
but the code do NOT invoke it.

* Retrieve a JDBC object value for the specified column.
* <p>The default implementation delegates to
* {@link #getColumnValue(ResultSet, int, Class)}.
* @param rs is the ResultSet holding the data
* @param index is the column index
* @param pd the bean property that each result object is expected to match
* @return the Object value
* @throws SQLException in case of extraction failure
* @see #getColumnValue(ResultSet, int, Class)
*/
@Nullable
protected Object getColumnValue(ResultSet rs, int index, PropertyDescriptor pd) throws SQLException {
return JdbcUtils.getResultSetValue(rs, index, pd.getPropertyType());
}
/**
* Retrieve a JDBC object value for the specified column.
* <p>The default implementation calls
* {@link JdbcUtils#getResultSetValue(java.sql.ResultSet, int, Class)}.
* Subclasses may override this to check specific value types upfront,
* or to post-process values return from {@code getResultSetValue}.
* @param rs is the ResultSet holding the data
* @param index is the column index
* @param paramType the target parameter type
* @return the Object value
* @throws SQLException in case of extraction failure
* @since 5.3
* @see org.springframework.jdbc.support.JdbcUtils#getResultSetValue(java.sql.ResultSet, int, Class)
*/
@Nullable
protected Object getColumnValue(ResultSet rs, int index, Class<?> paramType) throws SQLException {
return JdbcUtils.getResultSetValue(rs, index, paramType);
}

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)status: backportedAn issue that has been backported to maintenance branchestype: documentationA documentation task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions