Release notes - SonarJava - 8.24
New Feature
SONARJAVA-5978 Support Compact Source Files
SONARJAVA-5984 Support Module Import Declarations
SONARJAVA-6084 S8433: Validation logic should be placed in constructor prologue when possible
SONARJAVA-6096 S8445: Group import declarations by specificity
SONARJAVA-6108 Implement S8432 : "ScopedValue.where" results should not be ignored
SONARJAVA-6113 Implement : S8444 - Validation and data preparation logic before super() should not bloat constructor
False Positive
SONARJAVA-5340 FP on S1171 in anonymous classes
SONARJAVA-5866 S6816 should not raise on the parameter injected when the value is annotated as NonNull
SONARJAVA-5873 S5961: AssertJ descriptions and custom error messages breaks the assertion count
SONARJAVA-5936 False Positive for nested wildcard for S1452
SONARJAVA-6014 FP:java:S1258 doesn’t exclude jakarta.inject.Inject
SONARJAVA-6095 S1166 Should not report when the exception is explicitely ignored using unnamed variable _
SONARJAVA-6099 S1135 Confuses Spanish word "todo" with English TODO
SONARJAVA-6111 S6204 should not raise an issue when addFirst/addLast/removeFirst/removeLast is called on the list
Task
SONARJAVA-5976 Remove obsolete projects from Next
SONARJAVA-6010 Prepare next development iteration (8.24.0-SNAPSHOT)
SONARJAVA-6012 Migrate ITs to Java 21 to fix CI breakage
SONARJAVA-6034 Fix sonar-java build
SONARJAVA-6077 Update "Prepare Next Development Iteration" workflow
SONARJAVA-6094 Fix unused import
SONARJAVA-6124 Create Claude command to migrate test samples
SONARJAVA-6127 Update rule metadata
Improvement
SONARJAVA-5859 Upload the aggregated diff report on a github page
SONARJAVA-5961 Upgrade sonar-java-jdt to 1.8
SONARJAVA-5973 Improve testkit tool to be able to use specific dependencies for tests
SONARJAVA-5982 S106 Should not be raised on compact source files
SONARJAVA-5983 S1220 (no unnamed package) is not applicable to compact source files
SONARJAVA-6028 S1120 Update for compact source files to avoid raising FPs
SONARJAVA-6075 S2325 Raises issues on instance main() methods
SONARJAVA-6086 Avoid unused String[] args parameter in main method
SONARJAVA-6090 S106 should detect usage of IO
SONARJAVA-6105 MethodTreeCheck.isMainMethod should be updated for Java 25 (S2096, S112, S1147, S1160, S1172, S1118, S6539)
SONARJAVA-6116 Add Java-25 project to peachee-java-kotlin
SONARJAVA-6117 S8433 should not raise issue for classes without superclass declared
SONARJAVA-6119 S3078 should report on compact source files
SONARJAVA-6123 S8433 Do not raise issues without an explicit constructor call
Documentation
SONARJAVA-5955 S122: Noncompliant example should not violate unrelated rules
SONARJAVA-6007 S2301 Inappropriate Code Sample
False Negative
SONARJAVA-5016 S2077 Add support for Jakarta
SONARJAVA-5909 FN on S3752 when @RequestMapping in class
SONARJAVA-5931 Upgrade S5128 to support the Jakarta package
Sub-task
SONARJAVA-6021 Unified dogfooding : fix/setup sync for SonarJava