File tree Expand file tree Collapse file tree 1 file changed +1
-4
lines changed
microprofile-liberty-redis/src/main/java/org/jnosql/demoee/rest Expand file tree Collapse file tree 1 file changed +1
-4
lines changed Original file line number Diff line number Diff line change @@ -21,21 +21,18 @@ public Iterable<Hero> findHeroesBy(HeroesQuery heroesQuery) {
2121
2222 var nameMatches = Optional
2323 .ofNullable (heroesQuery .name ())
24- .filter (Objects ::nonNull )
2524 .filter (Predicate .not (String ::isBlank ))
2625 .map (m -> (Predicate <Hero >) h -> h .nameMatchesWith (m ))
2726 .orElse (null );
2827
2928 var secretIdentityMatches = Optional
3029 .ofNullable (heroesQuery .secretIdentity ())
31- .filter (Objects ::nonNull )
3230 .filter (Predicate .not (String ::isBlank ))
3331 .map (m -> (Predicate <Hero >) h -> h .secretIdentityMatchesWith (m ))
3432 .orElse (null );
3533
3634 var impactPhraseMatches = Optional
3735 .ofNullable (heroesQuery .impactPhrase ())
38- .filter (Objects ::nonNull )
3936 .filter (Predicate .not (String ::isBlank ))
4037 .map (m -> (Predicate <Hero >) h -> h .impactPhraseMatchesWith (m ))
4138 .orElse (null );
@@ -52,7 +49,7 @@ public Iterable<Hero> findHeroesBy(HeroesQuery heroesQuery) {
5249
5350 return heroes .values ()
5451 .stream ()
55- .filter ((( Predicate < Hero >) matcherFilters .orElse (h -> false ) )).toList ();
52+ .filter (matcherFilters .orElse (h -> false )).toList ();
5653 }
5754
5855 return heroes .values ().stream ().toList ();
You can’t perform that action at this time.
0 commit comments