Use parenthesis with single-arg lambdas
Use regular expression search/replace to ensure all single-arg lambdas have parenthesis. This aligns with the style used in Spring Boot and ensure that single-arg and multi-arg lambdas are consistent. Issue gh-8945
This commit is contained in:
@@ -33,7 +33,7 @@ public class ContactDaoSpring extends JdbcDaoSupport implements ContactDao {
|
||||
|
||||
public void create(final Contact contact) {
|
||||
getJdbcTemplate().update("insert into contacts values (?, ?, ?)",
|
||||
ps -> {
|
||||
(ps) -> {
|
||||
ps.setLong(1, contact.getId());
|
||||
ps.setString(2, contact.getName());
|
||||
ps.setString(3, contact.getEmail());
|
||||
@@ -42,13 +42,13 @@ public class ContactDaoSpring extends JdbcDaoSupport implements ContactDao {
|
||||
|
||||
public void delete(final Long contactId) {
|
||||
getJdbcTemplate().update("delete from contacts where id = ?",
|
||||
ps -> ps.setLong(1, contactId));
|
||||
(ps) -> ps.setLong(1, contactId));
|
||||
}
|
||||
|
||||
public void update(final Contact contact) {
|
||||
getJdbcTemplate().update(
|
||||
"update contacts set contact_name = ?, address = ? where id = ?",
|
||||
ps -> {
|
||||
(ps) -> {
|
||||
ps.setString(1, contact.getName());
|
||||
ps.setString(2, contact.getEmail());
|
||||
ps.setLong(3, contact.getId());
|
||||
|
||||
@@ -162,7 +162,7 @@ public class DataSourcePopulator implements InitializingBean {
|
||||
for (int i = 1; i < createEntities; i++) {
|
||||
final ObjectIdentity objectIdentity = new ObjectIdentityImpl(Contact.class,
|
||||
(long) i);
|
||||
tt.execute(arg0 -> {
|
||||
tt.execute((arg0) -> {
|
||||
mutableAclService.createAcl(objectIdentity);
|
||||
|
||||
return null;
|
||||
@@ -267,7 +267,7 @@ public class DataSourcePopulator implements InitializingBean {
|
||||
}
|
||||
|
||||
private void updateAclInTransaction(final MutableAcl acl) {
|
||||
tt.execute(arg0 -> {
|
||||
tt.execute((arg0) -> {
|
||||
mutableAclService.updateAcl(acl);
|
||||
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user