ReferencePipeline Exception

Posted by Ligar Mugi Syahid on August 20, 2023
1 min read · Last Modified: January 21, 2024

java streams java.util.stream.ReferencePipeline Exception

need .flatMap(Collection::stream)


    projects.stream()
            .map(Project::getGroups)
            .flatMap(Collection::stream)
            .map(Group::getStudents)
            .flatMap(Collection::stream)
            .map(Student::getName)
            .collect(toList());


Tags: [ java  bug  ]