Closed naitikdani closed 5 years ago
Hi @naitikdani,
You're trying to perform a partial match (i.e. the route you're trying to match against doesn't contain the match
element that the route you created via YAML contains), which is not how List.contains
works: this will only return true if the exact object exists in the list.
What you want to do instead is something like:
http.stream().anyMatch(r -> r.getRoute().stream().anyMatch(d -> d.getDestination().equals(dst)))
.
Hello @metacosm ,
I have this yaml file:
I want to do a lookup on http route with route/destination/host as
service-coke
and port 8080.I wrote this code and it returned
false
:I got
entryFound
asfalse
. Is this the right way to do a lookup for http route? Thanks in advance