Hi~
It’s seems to be erroneous judgement at reactor chains calls way like the followling:
Mono<Map<String, List<BasicRankingItemInfo>>> basicRankingItemInfoGroupAsync = Flux.fromIterable(segmentList)
.flatMap(this::searchRankingItemGroupAsync) // reported that this line may produce npe
.collectList()
.map(groupMapList -> {
...
});
sonar report that Flux.fromIterable(segmentList).flatMap(...) may produce NPE, but i make sure the result of ‘Flux.fromIterable()’ can not be null. By the way, sornaqube version 7.2 and the framework is spring reactor version 3.4.21, pom as following
Sorry, maybe i wasn’t clear enough before, sornaqube 7.2 and reactor framework version 3.4.21 just as mentioned, so i simplified the demo code as follow: