Skip to content

Commit b52136d

Browse files
committed
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
1 parent 1f72ab4 commit b52136d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/docs/asciidoc/data-access.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2733,10 +2733,10 @@ The following query finds and populates a single domain object:
27332733
Actor actor = jdbcTemplate.queryForObject(
27342734
"select first_name, last_name from t_actor where id = ?",
27352735
(resultSet, rowNum) -> {
2736-
Actor actor = new Actor();
2737-
actor.setFirstName(resultSet.getString("first_name"));
2738-
actor.setLastName(resultSet.getString("last_name"));
2739-
return actor;
2736+
Actor newActor = new Actor();
2737+
newActor.setFirstName(resultSet.getString("first_name"));
2738+
newActor.setLastName(resultSet.getString("last_name"));
2739+
return newActor;
27402740
},
27412741
1212L);
27422742
----

0 commit comments

Comments
 (0)