The rule c:S836 didn't work

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    Enterprise edition 9.4.0.54424

  • what are you trying to achieve
    A code block based on c:S836 rule should report a bug.

  • what have you tried so far to achieve this
    I rewrote the block of code following the example, and the analysis reported a bug.

Thank you for the report @honghua!
This indeed is False Positive and I have incorported in the following ticket., that was previously discussing access to fields of the returned object, but as you have indicated, the issue is happening earlier. We do not have a specific plan to work on this ticket soon. However, we are working on an improvement for bug detection engine, and it may be addressed by other changes.