Sonar not able to analyze the project with pattern matching for switch

Hi Team,

We are running SonarQube community edition version 8.9.6. Since we do not have Java 17 support here, we have installed a FindBugs plugin, version 4.0.6. Now we are able to get report for Java 17 projects but there is still an issue with Java-17 specific support. For example, pattern matching for switch, sonar not able to analyze the project. It is complaining about the line:
case Integer i → String.format( “int %d”, i );

Can you please help us to understand if we can get this feature in our current SonarQube(8.9.6) with latest version FindBugs plugin which already exists in our instance

Thanks in advance!

Hi,

Support for new language features is not backported to the LTS, so this won’t be available.

 
HTH,
Ann

Hi Ann,

Thank you for your answer. Can you please let us know when we can get a support for Pattern matching for switch.

Regards,
M G Preethi

Hi M G,

I believe you can get it by upgrading to the latest version.

If you have to stay on the LTS, then look for the new LTS in 2023 Q1.

 
HTH,
Ann

1 Like