Issue created if Optional isEmpty() and following get()

Hi, I believe that under the hood the version of sonarjava used is prior to 5.12.1 which contains this fix : https://jira.sonarsource.com/browse/SONARJAVA-3087

Your problem is a duplicate of this one : squid:S3655 (Optional use without isPresent) should not fire if .isEmpty() was called

So upgrading to latest SonarLint or updating sonarjava on your sonarqube instance should make the issue go away.