After looking at the following question at StackOverflow, I attempted to reproduce the described use case and experienced it exactly as described:
This issue was reproduced on Eclipse Oxygen.2 Release (4.7.2) with SonarLint 3.5.0. I also tried this use case in IntelliJ, but the issue was not encountered.
Steps to reproduce :
--
Important: this SonarLint Google Group will close on June 11th, 2018, in order to move to a new forum to power even more community discussions. See details in this post: https://groups.google.com/d/msg/sonarlint/7mRg447YjWM/yk64X5HyAQAJ
---
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/ae13900a-05bb-4e45-b046-a88211a54195%40googlegroups.com.