Parse error on valid Java file

The Java scanner has reported the following log line in the Java sensor:

ERROR: Parse error at line 6 column 35: Syntax error on token ";", delete this token

This line contains an unnecessary trailing semicolon. It’s syntactically correct but produces a parse error:


Versions used:

INFO: SonarScanner
INFO: Java 11.0.6 AdoptOpenJDK (64-bit)
INFO: Linux 5.4.0-47-generic amd64

This is quite minor to resolve, but I imagine it prevented the rest of my file from being analysed.

Hope that’s useful,

Hello @Martin_Foot,

Welcome to the SonarSource community, and thank you for taking the time to provide feedback.

This seems like a known issue, please have a look at SONARJAVA-3486.