As shown in the picture, SonarLint suggests me to change JsonNode to use its interface TreeNode; however, if I do so, I need to change the method body to return (JsonNode) params.get(0); and add type checking.
Thank you, I managed to reproduce it, and I consider it a false positive.
You should not be forced by a rule to change the logic of your code when it makes sense.
In my opinion, the rule here is failing to understand that whatever your method will return, is going to be the same type as the parameter that you pass to it. So changing the parameter’s type will affect the return type of the method or force you to add logic to ensure you still return the correct type.