Procházet zdrojové kódy

Merge pull request #744 from matthewstyler/master

Fixes #720 replace lambda with method ref
Stuart Kent před 9 roky
rodič
revize
716feef258

+ 1
- 1
exercises/allergies/src/example/java/Allergies.java Zobrazit soubor

@@ -12,7 +12,7 @@ public class Allergies {
12 12
 
13 13
     public List<Allergen> getList() {
14 14
         return EnumSet.allOf(Allergen.class).stream()
15
-                .filter(x -> isAllergicTo(x))
15
+                .filter(this::isAllergicTo)
16 16
                 .collect(Collectors.toList());
17 17
     }
18 18