From 1ee4490f0d61790c548e7838ce418c88fadcda16 Mon Sep 17 00:00:00 2001 From: Kate Kraska Date: Wed, 20 Nov 2024 21:06:33 +0200 Subject: [PATCH] fix problem build --- src/main/java/practice/StreamPractice.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/practice/StreamPractice.java b/src/main/java/practice/StreamPractice.java index 6b23e53fc..d2e896786 100644 --- a/src/main/java/practice/StreamPractice.java +++ b/src/main/java/practice/StreamPractice.java @@ -54,8 +54,7 @@ public List getWorkablePeople(int fromAge, int femaleToAge, int maleToAg public List getCatsNames(List peopleList, int femaleAge) { return peopleList.stream() - .filter(person -> person.getSex() == Person.Sex.WOMAN - && person.getAge() >= femaleAge) + .filter(person -> person.getSex() == Person.Sex.WOMAN && person.getAge() >= femaleAge) .flatMap(person -> person.getCats().stream()) .map(Cat::getName) .collect(Collectors.toList());