We’ve dropped another 3 rules to help you lean into writing (or generating) Java 25 code right.
JEP 513: Flexible Constructor Bodies
- S8447: Subclass fields should be initialized before calls to “super()” or “this()”
JEP 512: Compact Source Files and Instance Main Methods
- S8446: Only one “main” method should be defined in a class
- S8450: Prefer “IO.readln()” over “BufferedReader” boilerplate
Availability for these is as follows:
SonarQube Cloud - now
SonarQube Server - from 2026.2
SonarQube Community Build - from 26.4.x
SonarQube IDE - your next plugin update
We received your feedback on rule S8445, and relaxed it to allow more styles of sorting imports. As always, we welcome more feedback on these rules.
Jean