Hello,
I have a reported issue by Sonar "Generic wildcard types should not be used in return parameters (squid:S1452)"
The thing is that
the method is
called in another place where the expected return type of an implemented method of an interface which is part of a dependency is using the wildcard types.
It seems to me that I can't get rid of it.
If I modify the method reported by Sonar, the "implemented" other method is complaining.
from "public CompletableFuture<List<? extends SymbolInformation>> getDocumentSymbols()" to "public CompletableFuture<List<SymbolInformation>> getDocumentSymbols()"
![](https://lh3.googleusercontent.com/-8bzBPhJHEuM/WxU461SqSWI/AAAAAAAAARo/UvbQh0bwCPUVGHGhVHKDYCfRsg-FLVqcwCLcBGAs/s1600/typeMismatch.png)
The error is "Type mismatch: cannot convert from CompletableFuture<List<SymbolInformation>> to CompletableFuture<List<? extends SymbolInformation>>"
and I can't modify the documentSymbol method as it is part of a dependency.
Is it a false-positive or I misunderstood something?
regards,