Stream<SomeClazz> (Stream<Stream<SomeClazz>> objectStreams) { return objectStreams.map(Stream::distinct).<warning descr="Redundant 'flatMap()' call: previous 'map()' call can replace the 'flatMap()' step">flatMap(Function.identity())</warning>; }