anchor.diff:  ----
   	List<Actor> actors = this.jdbcTemplate.query(
   			"select first_name, last_name from t_actor",
  -			new RowMapper<Actor>() {
  -				public Actor mapRow(ResultSet rs, int rowNum) throws SQLException {
  -					Actor actor = new Actor();
  -					actor.setFirstName(rs.getString("first_name"));
  -					actor.setLastName(rs.getString("last_name"));
  -					return actor;
  -				}
  +			(resultSet, rowNum) -> {
  +				Actor actor = new Actor();
  +				actor.setFirstName(resultSet.getString("first_name"));
  +				actor.setLastName(resultSet.getString("last_name"));
  +				return actor;
   			});
   ----
   [source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
  
positive.code: 
  
  If the last two snippets of code actually existed in the same application, it would make
  sense to remove the duplication present in the two `RowMapper` anonymous inner classes
  and extract them out into a single class (typically a `static` nested class) that could
  then be referenced by DAO methods as needed. For example, it may be better to write the
  preceding code snippet as follows:
  
  [source,java,indent=0,subs="verbatim,quotes",role="primary"]
  .Java
  ----
  	public List<Actor> findAllActors() {
  		return this.jdbcTemplate.query( "select first_name, last_name from t_actor", new ActorMapper());
  	}
  
  	private static final class ActorMapper implements RowMapper<Actor> {
  
  		public Actor mapRow(ResultSet rs, int rowNum) throws SQLException {
  			Actor actor = new Actor();
  			actor.setFirstName(rs.getString("first_name"));
  			actor.setLastName(rs.getString("last_name"));
  			return actor;
  		}
  	}
  ----
  [source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
  .Kotlin
  
negative.code: ----
  	Actor actor = this.jdbcTemplate.queryForObject(
  			"select first_name, last_name from t_actor where id = ?",
  			(resultSet, rowNum) -> {
  				Actor newActor = new Actor();
  				newActor.setFirstName(resultSet.getString("first_name"));
  				newActor.setLastName(resultSet.getString("last_name"));
  				return newActor;
  			},
  			1212L);
  ----
  [source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
  .Kotlin
  