I can not reproduce with latest version of Java analyzer. So I need to know which version are you using.
Are you using connected mode in SonarLint (your SonarLint is connected to SonarQube)? If no, tell the version of SonarLint and IDE you are using. If yes, you should check version of “SonarJava” in Marketplace.