Hi Java Developers,
The latest analyzer release includes new rules for Java targeting common frameworks and pitfalls. These aim to catch issues with how a framework is being used early in the development process, before they cause application crashes or maintainability issues in the long term.
These new rules include:
- S8695: Redundant time instantiation patterns should be simplified
- S8908: Methods annotated with “@CacheResult” should not return void
- S8909: “CacheKeyGenerator” implementations should be instantiable by the framework
- S8910: Interfaces annotated with “@Mapper” should contain at least one “@DaoFactory” method
- S8911: Methods annotated with “@Startup” should be non-static, non-producer, and parameter-free
- S8912: Custom CredentialsProvider implementations should be annotated with “@Unremovable”
- S8913: REST Data with Panache resource interfaces should not have implementation classes
- S8947: JPA entity classes should not be final
- S8948: “@OneToMany” relationships should use “mappedBy” or “@JoinColumn”
- S8954: Bean Validation constraints should not be placed on static fields
These checks are available for Java projects now in SonarQube Cloud and from SonarQube Server 2026.4.
We’d love your feedback: which Java frameworks should we prioritize next?