Skip to content

Commit a8b6337

Browse files
madvenpivovarit
authored andcommitted
minor java8 update (eugenp#1684)
Anonymous new Consumer<String>() replaced with method reference.
1 parent f4d56d7 commit a8b6337

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎core-java/src/test/java/org/baeldung/java/shell/JavaProcessUnitIntegrationTest.java‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,7 @@ public void run() {
2525
}
2626
}
2727

28-
private Consumer<String> consumer = new Consumer<String>() {
29-
@Override
30-
public void accept(String s) {
31-
Assert.assertNotNull(s);
32-
}
33-
};
28+
private Consumer<String> consumer = Assert::assertNotNull;
3429

3530
private String homeDirectory = System.getProperty("user.home");
3631

0 commit comments

Comments
 (0)