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:
Sam Brannen
2020-03-22 20:28:59 +01:00
parent 1f72ab4816
commit b52136dfa5

View File

@@ -2733,10 +2733,10 @@ The following query finds and populates a single domain object:
Actor actor = jdbcTemplate.queryForObject(
"select first_name, last_name from t_actor where id = ?",
(resultSet, rowNum) -> {
Actor actor = new Actor();
actor.setFirstName(resultSet.getString("first_name"));
actor.setLastName(resultSet.getString("last_name"));
return actor;
Actor newActor = new Actor();
newActor.setFirstName(resultSet.getString("first_name"));
newActor.setLastName(resultSet.getString("last_name"));
return newActor;
},
1212L);
----