Skip to content

Commit 9f195e4

Browse files
committed
Use compact Lambda
1 parent c7859c5 commit 9f195e4

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/test/java/examples/animal/data/AnimalDataTest.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -580,9 +580,7 @@ void testInConditionWithEmptyList() {
580580
.build()
581581
.render(RenderingStrategies.MYBATIS3);
582582

583-
assertThatExceptionOfType(PersistenceException.class).isThrownBy(() -> {
584-
mapper.selectMany(selectStatement);
585-
});
583+
assertThatExceptionOfType(PersistenceException.class).isThrownBy(() -> mapper.selectMany(selectStatement));
586584
}
587585
}
588586

@@ -1425,7 +1423,7 @@ record = new AnimalData();
14251423
.build()
14261424
.render(RenderingStrategies.MYBATIS3);
14271425

1428-
batchInsert.insertStatements().stream().forEach(mapper::insert);
1426+
batchInsert.insertStatements().forEach(mapper::insert);
14291427
sqlSession.commit();
14301428

14311429
SelectStatementProvider selectStatement = select(id, animalName, bodyWeight, brainWeight)
@@ -1475,7 +1473,7 @@ record = new AnimalData();
14751473
.build()
14761474
.render(RenderingStrategies.MYBATIS3);
14771475

1478-
batchInsert.insertStatements().stream().forEach(mapper::insert);
1476+
batchInsert.insertStatements().forEach(mapper::insert);
14791477
sqlSession.commit();
14801478

14811479
SelectStatementProvider selectStatement = select(id, animalName, bodyWeight, brainWeight)

src/test/java/examples/schema_supplier/SchemaSupplierTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ void testUnsetSchemaProperty() {
7272
user.setId(1);
7373
user.setName("Fred");
7474

75-
assertThrows(PersistenceException.class, () -> {
76-
mapper.insert(user);
77-
});
75+
assertThrows(PersistenceException.class, () -> mapper.insert(user));
7876
}
7977
}
8078

0 commit comments

Comments
 (0)