This is controversial and the Sonar team had to remove it from the default "Sonar Way" profile https://rules.sonarsource.com/java/tag/java10/RSPEC-6212