Buggy code:
@ Override public Publisher < Object > distinct ( final String fieldName , final Object filter , final DistinctOptions options ) { } @ Override public FluentFindPublisher < T > find ( ) { } @ Override public < C > FluentFindPublisher < C > find ( final Class < C > clazz ) { } @ Override public FluentFindPublisher < T > find ( final Object filter ) { } @ Override public < C > FluentFindPublisher < C > find ( final Object filter , final Class < C > clazz ) { } @ Override public Publisher < Document > aggregate ( final List < ? > pipeline ) { } @ Override public < C > Publisher < C > aggregate ( final List < ? > pipeline , final Class < C > clazz ) { } @ Override public Publisher < Document > aggregate ( final List < ? > pipeline , final AggregateOptions options ) { } @ Override public < C > Publisher < C > aggregate ( final List < ? > pipeline , final AggregateOptions options , final Class < C > clazz ) { } @ Override public Publisher < Document > mapReduce ( final String mapFunction , final String reduceFunction ) { } @ Override public Publisher < Document > mapReduce ( final String mapFunction , final String reduceFunction , final MapReduceOptions options ) { } @ Override public < C > Publisher < C > mapReduce ( final String mapFunction , final String reduceFunction , final Class < C > clazz ) { } @ Override public < C > Publisher < C > mapReduce ( final String mapFunction , final String reduceFunction , final MapReduceOptions options , final Class < C > clazz ) { } @ Override public Publisher < BulkWriteResult > bulkWrite ( final List < ? extends WriteModel < ? extends T > > requests ) { } @ SuppressWarnings ( "unchecked" ) @ Override public Publisher < BulkWriteResult > bulkWrite ( final List < ? extends WriteModel < ? extends T > > requests , final BulkWriteOptions options ) { } @ Override public Publisher < Void > insertOne ( final T document ) { } @ Override public Publisher < Void > insertMany ( final List < ? extends T > documents ) { } @ Override public Publisher < Void > insertMany ( final List < ? extends T > documents , final InsertManyOptions options ) { } @ Override public Publisher < DeleteResult > deleteOne ( final Object filter ) { } @ Override public Publisher < DeleteResult > deleteMany ( final Object filter ) { } @ Override public Publisher < UpdateResult > replaceOne ( final Object filter , final T replacement ) { } @ Override public Publisher < UpdateResult > replaceOne ( final Object filter , final T replacement , final UpdateOptions updateOptions ) { } @ Override public Publisher < UpdateResult > updateOne ( final Object filter , final Object update ) { } @ Override public Publisher < UpdateResult > updateOne ( final Object filter , final Object update , final UpdateOptions options ) { } @ Override public Publisher < UpdateResult > updateMany ( final Object filter , final Object update ) { } @ Override public Publisher < UpdateResult > updateMany ( final Object filter , final Object update , final UpdateOptions options ) { } @ Override public Publisher < T > findOneAndDelete ( final Object filter ) { } @ Override public Publisher < T > findOneAndDelete ( final Object filter , final FindOneAndDeleteOptions options ) { } @ Override public Publisher < T > findOneAndReplace ( final Object filter , final T replacement ) { } @ Override public Publisher < T > findOneAndReplace ( final Object filter , final T replacement , final FindOneAndReplaceOptions options ) { } @ Override public Publisher < T > findOneAndUpdate ( final Object filter , final Object update ) { } @ Override public Publisher < T > findOneAndUpdate ( final Object filter , final Object update , final FindOneAndUpdateOptions options ) { } @ Override public Publisher < Void > dropCollection ( ) { } @ Override public Publisher < Void > createIndex ( final Object key ) { } @ Override public Publisher < Void > createIndex ( final Object key , final CreateIndexOptions options ) { } @ Override public Publisher < Document > getIndexes ( ) { } @ Override public < C > Publisher < C > getIndexes ( final Class < C > clazz ) { <START_BUG> return Publishers . flatten ( new com . mongodb . operation . ListIndexesOperation < C > ( namespace , getCodec ( clazz ) ) , options . getReadPreference ( ) , executor ) ; <END_BUG> } @ Override public Publisher < Void > dropIndex ( final String indexName ) { } @ Override public Publisher < Void > dropIndexes ( ) { } @ Override public Publisher < Void > renameCollection ( final MongoNamespace newCollectionNamespace ) { } @ Override public Publisher < Void > renameCollection ( final MongoNamespace newCollectionNamespace , final RenameCollectionOptions options ) { } private Publisher < DeleteResult > delete ( final Object filter , final boolean multi ) { } private Publisher < UpdateResult > update ( final Object filter , final Object update , final UpdateOptions updateOptions , final boolean multi ) { } private Publisher < UpdateResult > createUpdateResult ( final Publisher < BulkWriteResult > publisher ) { } private Codec < T > getCodec ( ) { } private < C > Codec < C > getCodec ( final Class < C > clazz ) { } private BsonDocument asBson ( final Object document ) { } private < D > List < BsonDocument > createBsonDocumentList ( final List < D > pipeline ) { } }

Fix:
return Publishers . flattenCursor ( new com . mongodb . operation . ListIndexesOperation < C > ( namespace , getCodec ( clazz ) ) , options . getReadPreference ( ) , executor ) ;