Raw types warning

Michael Nascimento misterm at gmail.com
Thu Apr 18 13:34:46 PDT 2013


Hi guys,

I have this:

public List<Dealer> findBranchesByHeadQuarterIds(Collection<Long>
headQuarterIds) {
    return findByIds(headQuarterIds).parallelStream()
        .map(Dealer::getBranches)
        .flatMap(Set::stream)
        .collect(toList());
}

given that:

List<Dealer> findByIds(Collection<Long>);
Set<Dealer> getBranches();

produces:

 [rawtypes] found raw type: Set
  missing type arguments for generic class Set<E>
  where E is a type-variable:
    E extends Object declared in interface Set

with all warnings turned on.

Is this expected?

Regards,
Michael


More information about the lambda-dev mailing list