Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
trydofor opened this issue Oct 8, 2022 · 0 comments
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) status: backported An issue that has been backported to maintenance branches type: documentation A documentation task
Milestone

Comments

@trydofor
Copy link

trydofor commented Oct 8, 2022

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);
}

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Oct 8, 2022
@rstoyanchev rstoyanchev added the in: data Issues in data modules (jdbc, orm, oxm, tx) label Jan 24, 2023
@snicoll snicoll changed the title BeanPropertyRowMapper.getColumnValue(ResultSet, int, Class) NOT invoked as Docs said Default behavior of BeanPropertyRowMapper.getColumnValue(ResultSet, int, Class) inconsistent with code Oct 2, 2023
@snicoll snicoll self-assigned this Oct 2, 2023
@snicoll snicoll added type: documentation A documentation task and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Oct 2, 2023
@snicoll snicoll added this to the 6.0.13 milestone Oct 2, 2023
@snicoll snicoll added the for: backport-to-5.3.x Marks an issue as a candidate for backport to 5.3.x label Oct 2, 2023
@github-actions github-actions bot added status: backported An issue that has been backported to maintenance branches and removed for: backport-to-5.3.x Marks an issue as a candidate for backport to 5.3.x labels Oct 2, 2023
@snicoll snicoll closed this as completed in e12eb94 Oct 2, 2023
@sbrannen sbrannen changed the title Default behavior of BeanPropertyRowMapper.getColumnValue(ResultSet, int, Class) inconsistent with code Javadoc for BeanPropertyRowMapper.getColumnValue(ResultSet, int, Class) is inconsistent with code Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) status: backported An issue that has been backported to maintenance branches type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

4 participants