Raw types warning
brian.goetz at oracle.com
Thu Apr 18 13:51:24 PDT 2013
OK, merge the map/flatMap as I suggested (ignoring the suggestion about
the stream source) and I suspect your problem will go away.
On 4/18/2013 4:47 PM, Michael Nascimento wrote:
> On Thu, Apr 18, 2013 at 5:45 PM, Brian Goetz <brian.goetz at oracle.com> wrote:
>> That's going pretty roundabout...
>> How about:
>> .map(id -> findDealer(id))
>> .flatMap(d -> d.getBranches().stream())
>> No reason to create intermediate garbage List<Dealer> if you can efficiently
>> map from id to Dealer.
> Except it hits the database multiple times instead of just one :-)
> I wonder about the raw types warning though.
More information about the lambda-dev