Revert renaming of local variable
This commit fixes the example by reverting the renaming of the local Actor variable to avoid a conflict with a same-named variable already in the current scope. See gh-24398
This commit is contained in:
@@ -2733,10 +2733,10 @@ The following query finds and populates a single domain object:
|
|||||||
Actor actor = jdbcTemplate.queryForObject(
|
Actor actor = jdbcTemplate.queryForObject(
|
||||||
"select first_name, last_name from t_actor where id = ?",
|
"select first_name, last_name from t_actor where id = ?",
|
||||||
(resultSet, rowNum) -> {
|
(resultSet, rowNum) -> {
|
||||||
Actor actor = new Actor();
|
Actor newActor = new Actor();
|
||||||
actor.setFirstName(resultSet.getString("first_name"));
|
newActor.setFirstName(resultSet.getString("first_name"));
|
||||||
actor.setLastName(resultSet.getString("last_name"));
|
newActor.setLastName(resultSet.getString("last_name"));
|
||||||
return actor;
|
return newActor;
|
||||||
},
|
},
|
||||||
1212L);
|
1212L);
|
||||||
----
|
----
|
||||||
|
|||||||
Reference in New Issue
Block a user